Okay, I understand. Thanks. -- Brett P.
On Sat, Jan 17, 2009 at 4:46 AM, Simon Moss <[email protected]> wrote: > Isn't it because the img tag when within an anchor tag will by default show > a blue border around it - behaviour from the days before css? Separate > behaviour from the anchor tag itself - a special instance of the img tag > itself. > > So if you're wondering why - well - because of history? (I never thought > working with the web would make me feel old... ;-) ) > > Simon M > >> The question, better explained is, using the above code, why do you have >> to apply the CSS attribute, border: none;, to the image tag within the >> anchor tag? Rather than using text-decoration: none;, to the anchor tag, >> like you would use it to apply to an anchor tag with text in it to remove >> the underline. >> >> Observe... >> >> <a href="link.html" style="text-decoration: none;">text is now not >> underlined</a> >> <a href="link.html">text is now underlined</a> >> >> As the anchor tag automatically applies the blue, underlined part of the >> text, when surrounding an image tag it puts the underline on the image, but >> in a blue border form around the image. Why use border: none; to the image >> rather than text-decoration: none; to the anchor tag? >> >> If you have a page that needs all the links to have no underline or >> "border" (if an image is a link as well), why would want to have to have to >> declarations for that, rather than one? You could have: >> >> a >> { >> text-decoration: none; >> } >> >> a img >> { >> border: none; >> } >> >> but that takes a little more coding. Not that much more but still... you >> could have just used the a { text-decoration: none; }. >> >> -- >> Brett P. >> > > > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: [email protected] > ******************************************************************* > > ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [email protected] *******************************************************************
