Quick question : How to clear a css border and padding for only one image?

In a DIV#main i got
#main img {padding:10px; background-color:#ffffff; border:#899c38 1px solid;}
…so all my image get a nice border…

inside that div i inserted a table of price and I want my image inside that table (nammed .tableau) to having no style at all… stupid question but just doesnt seems to get it !

any hints ?

#main .tableau img {
padding: 0
border: 0 none;
}

since you don’t have padding, you don’t have to worry about background-color.

thanks
but not working… :frowning:

add a ; after padding: 0. That should work. :slight_smile:

haaa. thanks.
Ok so thses are working well

#main table img {padding: 0;border: 0 none}
and
#main .tableau img {padding: 0;border: 0 none}

all the other ones doesn’t work
img.nostyle {border-style:none; padding:0; margin:0;}
…or neither in html
border=“0” style=“border-style:none;”

thanks for helping guys :slight_smile:

don’t use border-style use only border

Hi, that’s because just img.nostyle doesn’t have enough weight to override the ID selectors. The inline styling should have worked. Try adding !important to the end of the CSS rule (before the ; ) to see if it’s just specificity issue. Got a link so we can more easily debug?

The correct terminology is border:0 or border:none. Don’t only specify the border style.