Hello. This is a rather simple question but I am relatively new at HTML. When I try to link an ad image, I see an unsightly border around the image. I have removed the border using this code in my external style sheet: a.photo {color:#fff; text-decoration:none;} (my background colour is white, #fff). Is there a more elegant way of removing these borders that does not depend on background colour? Thanks
Hi I'm no expert but what I do is to remove the border at the image tags e.g <img src="/image.jpg" border="0"> At least I thing this is right as it removes the overall outline from the image. You can possibly so the same using CSS. hope this helps. Happy Holidays
Ok thanks very much for your help. I was using the xhtml strict definition, and border is a deprecated attribute, but i added Css IMG { border:0px; } to my external stylesheet and it worked awesomely, thanks.
In xhtml, all elements are lowercase. It would serve you well to get into the habit of using all lowercase element names and attributes. Class and id names are case sensitive in the css. cheers, gary
Also, you do not need the px after 0, as 0 in any length measurement is nothing. You can append the 0 length with px, but it is not necessary, and if you get in the habit of not adding it on, it can save a few key strokes. So the image tag should be img { border: 0; } if you ever decide you -do- want the border on one or two images back, just make a new class for them, and select the border thickness.