Forums

CSS styling for different images inside post (5 posts)

  1. JaneLitte
    Member
    Posted 6 years ago #

    I have a border/padding for images on the blog but I really want the border and padding to only apply to book covers. Is there any way to easily accomplish this or is it better to insert the code manually for each image?

    I do use the upload images feature built into WP 2.0.2 for the book covers only. Would there be a way to add the border/padding/align codes to the "send to editor" command?

    http://dearauthr.com

  2. moshu
    Member
    Posted 6 years ago #

    I'd make a class in the stylesheet and apply only to bookcover images.

  3. JaneLitte
    Member
    Posted 6 years ago #

    Would this be appropriate?


    /* Style for BookCovers */

    .bookcover_img_r

    {
    border: 0px;
    align: right
    padding: 10px;
    margin: 10px;
    }

    .bookcover_img_l

    {
    border: 0px;
    align: left
    padding: 10px;
    margin: 10px;
    }

    with this type of code in the post? Because it isn't working right for me.

    <img id="image153" class="bookcover_img_r" src="http://dearauthor.com/wordpress/wp-content/uploads/2006/04/9702768.thumbnail.jpg" alt="The Seventh Unicron" />

    and it's dearauthor.com. Sorry

  4. moshu
    Member
    Posted 6 years ago #

    That's the idea :)
    I cannot guarantee for the CSS code you wrote, but you are going in the right direction.

  5. LiverpoolLad
    Member
    Posted 6 years ago #

    You might need to make a div for the bookcover container, then put the image inside it if you are mixing images on the one main page.

    #bookdiv {
    width:auto;
    }
    #bookdiv img {
    border: whatever;
    padding:what you need;
    border: and so on;
    }

    Once you make the div, you only need right click in Dreamweaver etc to write the div, then drop the image in there.

    <div id="bookdiv><img src="here"/></div>

Topic Closed

This topic has been closed to new replies.

About this Topic