Title: Image Borders?  Css Question
Last modified: August 18, 2016

---

# Image Borders? Css Question

 *  [Roar](https://wordpress.org/support/users/rori/)
 * (@rori)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/image-borders-css-question/)
 * is there a tag to add to CSS that whenever an image is put into a post, it could
   add a border?
 * I am trying to do it on my fangirly blog, using the old border=8 stuff, but it
   only lets it be the same color as the text.
 * [http://www.tuckle.net/constantine](http://www.tuckle.net/constantine)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [aetherfox](https://wordpress.org/support/users/aetherfox/)
 * (@aetherfox)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-184740)
 * `.post img {
    padding:4px; border:1px solid #ddd; }
 * This is directly from my CSS file, example at [http://avinash.apeshell.net](http://avinash.apeshell.net).
   You’ll obviously have to rename the classes to match your template.
 *  Thread Starter [Roar](https://wordpress.org/support/users/rori/)
 * (@rori)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-184871)
 * Thank you so much, I will try that right now.
 * p.s. Your blog is not only very nice to look at, it is fascinating to read. I
   blogrolled you.
 *  [drowatzky](https://wordpress.org/support/users/drowatzky/)
 * (@drowatzky)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-184913)
 * I don’t understand what you mean by re-naming classes to match my template. Can
   you give me some more specific information so I can apply these image borders
   to my site?
 *  [Lorelle](https://wordpress.org/support/users/lorelle/)
 * (@lorelle)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-184916)
 * If you look at your `index.php` file, you will find things like:
 * `<div id="post">`
 * and
 * `<div class="content">`
 * Or some variations like that. Find the one that is at the top of the list in 
   your Theme, like `rap` or `content` and put that in “front” of the example shown
   above in your `style.css` file. That is the file that holds all your presentation
   styles. It says, make this paragraph look like this, make the header look that
   that.
 * Then add the information written above with the correct “title” to match what
   is there.
 * You can find more information about all of this at [http://codex.wordpress.org/](http://codex.wordpress.org/)
   especially in the sections on Blog Layout and CSS.
 *  [revcruz](https://wordpress.org/support/users/revcruz/)
 * (@revcruz)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-185139)
 * Very helpful! When I use the css tag, it does put borders around all the images,
   but also on other static images (design element). I have to select the proper
   id or class to use. Is there proper CSS syntax to specify the effect to be applicable
   only to images of a particular webpage?
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-185140)
 * You might try a general img element: just below the body element in your style.
   css in the theme folder, add this:
 * img, img a {
    border:none; }
 * which should disable all borders EXCEPT the specifically stated .post img ones.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Image Borders? Css Question’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 6 participants
 * Last reply from: [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/image-borders-css-question/#post-185140)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
