Page 1 of 1

Straight foward CSS Question, I Think???

Posted: Mon Nov 03, 2008 7:58 pm
by mattpitts74
Hi There

I set a style for images as follows:
div#content img {
border-width: 1px;
border: 1px solid black;
margin-right: 20px;
float: left;
}
Which works fine to style all the images in the content DIV on my site, but I have an image of a PDF icon which I don't want a border around which has been inserted into the same DIV so I tried setting a CLASS called .pdf as follows
.pdf {
border-style: none;
border-width: 0;
}
thinks that would override the other style, but it doesn't.  I am fairly new to css and I would appreciate some help, as I'm sure there is a simple soultion to want I am trying to achive??

Thanks

Re: Straight foward CSS Question, I Think???

Posted: Mon Nov 03, 2008 9:12 pm
by Nullig
Did you try:

.pdf img {
border-style: none;
border-width: 0;
}

Re: Straight foward CSS Question, I Think???

Posted: Mon Nov 03, 2008 9:45 pm
by mattpitts74
Could you remind me how apply that style??

Thanks

Re: Straight foward CSS Question, I Think???

Posted: Mon Nov 03, 2008 10:09 pm
by Nullig
The same way you applied your:

.pdf {
border-style: none;
border-width: 0;
}

Just add the word "img" before the "{".

Nullig