Image borders

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have borders on the images that i want.
There are 2 images that i don want borders on & i have Border="0" on them
but i still have borders on them
How can i get the Borders off those 2 images ?
They are the Swish.gif & PC.gif

The page is

Dell Inspiron
Pentium dual-core 2.2 GHz
Windows Vista Home Premium SP1

Re: Image borders

On 5/31/2009 11:15 AM, desgnr wrote:
Quoted text here. Click to load it

You have 56 HTML errors and 7 CSS on that page.  Please correct those
errors before asking for help.


David E. Ross
< .

Don't ask "Why is there road rage?"  Instead, ask
"Why NOT Road Rage?" or "Why Is There No Such
Thing as Fast Enough?"

Re: Image borders

desgnr wrote:

Quoted text here. Click to load it

Your style sheet has


 {border:1px solid #000000;}

This sets a 1 pixel solid black border on all images. It can be overridden
by other CSS rules according to CSS cascade, but it cannot be overridden in

"The UA may choose to honor presentational attributes in an HTML source
document. If so, these attributes are translated to the corresponding CSS
rules with specificity equal to 0, and are treated as if they were inserted
at the start of the author style sheet. They may therefore be overridden by
subsequent style sheet rules."

Specificity 0 means that pretty much anything will override, in CSS terms.

Thus, if you wish to use CSS to set border on most images (and this is
really better than using HTML for that), you need to do the override in CSS.
You can do this by using an attribute like
style="border: none"
on the <img> tag, or using a class attribute on them, say
class="borderless", and the following in the CSS file:
img.borderless { border: none; }


Site Timeline