CSS, Technical

Background Image for Input Button with CSS (works in both Firefox and IE)

I was having trouble with setting a background image for an input button in IE 6. The background-image property that worked in Firefox 2.0 just did not have any effect on IE6. After a bit of googling, I realized that the background-image property will not work on IE and that we need to use the background property. Here’s a snippet that works on both browsers:

<input type=”button” class=”button” title=”Background Image” />

      background: white url(‘images/imagebutton.gif’) no-repeat top;
      width: 150px;
      height: 40px;

CSS, HTML, Microsoft, Technical, Visual Studio

Applying Style Sheets in Microsoft Visual Studio 2005

When trying to attach style sheets in Visual Studio I was wondering if there is an easier way to do so rather than typing the entire markup in the HTML view.

Check this out…

– Open up the Designer view of the page you want to apply the style

– From the Solution Explorer just drag and drop the CSS file on to a blank area of the screen

– A black border around the designer view indicates that the change is being applied

– Once done, you can see the changes on the fly!

I should have guessed that one 🙂