Multiple IMG "styles"


Registered User
16 posts

I have a site where every image in the #content is to have aborder and so the stylesheet shows:
#content img {
padding: 5px;
border: 1px solid #0098a6;
}
Works fine.
Now I have just one IMG that I want to have no border, only one in the entire site. I can't seem to make it happen. Any suggestions?
Thanks


Senior Advisor
1,625 posts

Can we have a link to your site? It would help us find the issue. :D
"An Apple doth not fall far from its tree, yet an orange does."

http://lbwebsites.com - Web-Design & Hosting.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.
http://www.sirage.com - Personal Site.
http://www.aveofluv.com - Wedding Site.


Senior Advisor
10,165 posts

if you give that particular image a class of it's own you would give it something like:

<img class="classnamehere" src...... etc.>

Then in your css do this:

.classnamehere {
padding: 5px;
border: 0;
}

If that doesn't work (I didn't test to see if images can contain a class so I'm just assuming so lol) try putting the image within a <div> tag and giving the div the class instead.
Jo Ann

http://elementsinwebdesign.com (a works still in progress)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.