Multiple IMG "styles"


Registered User
25 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."

https://lbwebsitedesign.com - Responsive Web Design & Web Hosting Services.
http://helpsite.sirage.com - HTML5, CSS3 and CC Help Video Blog.


Senior Advisor
10,761 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
http://elementsinwebdesign.com

Platform: Mac OS Yosemite 10.10.2
Processor: 3.1 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Graphics: Nvidia GeForce GT 750M 1024 MB



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.