Over-ride general tag formatting

Hi a bit of a css noob here, I have a wordpress site, and the theme has a css file that places a border around all the images in the posts

.entry img{
border:1px solid #333;

I have a page where I need to get rid of all borders around the images.

what’s the best way to do it?

Cheers

Yes, you can do that
.entry table img { border: none; } It would be even better if that table had a class or id.

actually, I kinda fluked it…

I added

.entry td img{
border:0px solid #333;
}

after it and it seems to work…

Hi dresden_phoenix

Thanks for the carefully thought out answer. I’m not a programmer so dealing with php sounds a bit daunting to me.

The border looks good on the rest of the site.

however I’ve got a little comparison table where i have small images 25px wide, that looks silly when each one of them has a border around it. Is there a css entry I could put on which says all images in tables should be border=none, or something?

w/o know more about your specific situation (code) this might be a little difficult to answer.

Suggestions off the top of my mind and assuming you want to get rid the borders in ALL the images thought that specific page , but not in any other page.

  1. Find the link to your CSS style sheet file on your header.php file
  2. AFTER that LINE insert a conditional PHP statement that determines if that is the page you want to change.
  3. if it is so, then have the PHP output the following:<style> .entry img{border:none;}</style>. You can add any other overrides to your general styles you want, between the style tags.

Another method is :

  1. in the header.php file, use PHP to add a pageID_? to your body tag
  2. Find the link to your CSS style sheet file
  3. After insert into the HTML <style> #pageID_(whatever the page ID is for the page you want to alter) .entry img{border:none;} </style>

If you dont like dealing with PHP, consider if it might be simpler to get rid of all borders through your entire site, and then just apply the borders to the specific images you want.

If this is the case, you can just go into your style sheet:
get rid of {border:1px solid #333;} on .entry img, and add .entry .bord{border:1px solid #333}. but now you’ll have to remember to add class =“bord” to any image tag you want to have a border when you enter it in your CMS