Forums

Image Borders? Css Question (7 posts)

  1. Roar
    Member
    Posted 7 years ago #

    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

  2. aetherFox
    Member
    Posted 7 years ago #

    .post img {
    padding:4px;
    border:1px solid #ddd;
    }

    This is directly from my CSS file, example at http://avinash.apeshell.net. You'll obviously have to rename the classes to match your template.

  3. Roar
    Member
    Posted 7 years ago #

    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.

  4. drowatzky
    Member
    Posted 7 years ago #

    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?

  5. Lorelle
    Member
    Posted 7 years ago #

    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/ especially in the sections on Blog Layout and CSS.

  6. revcruz
    Member
    Posted 5 years ago #

    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?

  7. vkaryl
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.