Straight foward CSS Question, I Think???

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
mattpitts74
Forum Members
Forum Members
Posts: 13
Joined: Thu Apr 12, 2007 10:47 pm

Straight foward CSS Question, I Think???

Post 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
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post by Nullig »

Did you try:

.pdf img {
border-style: none;
border-width: 0;
}
mattpitts74
Forum Members
Forum Members
Posts: 13
Joined: Thu Apr 12, 2007 10:47 pm

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

Post by mattpitts74 »

Could you remind me how apply that style??

Thanks
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

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

Post by Nullig »

The same way you applied your:

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

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

Nullig
Post Reply

Return to “Layout and Design (CSS & HTML)”