CSS not working with ASP:Image
Posted on 2011-09-06
I have an image on my ASP.Net page defined as follows:
<asp:Image ID="ImgPantry" runat="server" BorderStyle="None"
CssClass="borders_on" ImageUrl="~/images/HomePagePics/Pantry.jpg" />
which renders as this:
<img id="ImgPantry" class="borders_on" src="images/HomePagePics/Pantry.jpg" style="border-style:None;border-width:0px;" />
The borders_on is defined as follows in styles.css which is attached to the ASP.NET page:
border:3px solid #000000;
Not sure what I'm doing wrong but the border is not being displayed around the picture. The Height and Width are set but the border is not. Any idea what I'm doing wrong?