I'm using the following in ASP.net to display an Image, as well css. But when I view the source, it doesn't apply the CSS to the image. I've ran the W3C validator, and keeps telling that the Border attribute is obsolete:
Linking to my CSSThe border attribute is obsolete. Consider specifying img { border: 0; } in CSS instead.
<img id="ctl00_topmenu" src="_images/menutop1.jpg" alt="topmenu" border="0" />
Specifying my imageCode:<link href="_css/style.css" rel="stylesheet" type="text/css" />
CSS:Code:<asp:Image ID="topmenu" CssClass="topimg" runat="server" ImageUrl="~/_images/menutop1.jpg" AlternateText="topmenu"/>
And then this is what is displayed in the source of the site :Code:.topimg { vertical-align:top; padding:0px; border-width:1px; }
Any idea what am I doing wrong? Just let me know if I need to provide more code..Code:<img id="ctl00_topmenu" class="topimg" src="_images/menutop1.jpg" alt="topmenu" style="border-width:0px;" />
Thanks




Reply With Quote