Forums

IMAGE STYLING HELP!!! (8 posts)

  1. Diorable
    Member
    Posted 3 years ago #

    i placed the images styling tag into my CSS to gie my image a border by using this

    img {
    margin: 5px;
    padding: 10px;
    border: solid black 1px
    }

    but it puts images around every single one of my images including my header and my smilies which i don't want!!
    How do i get rid of the border on my header and smilies??

    Sumone please help im so frustrated with this ><''

  2. eridan
    Member
    Posted 3 years ago #

    I'm not sure how your website is built, but if you only want border around the pictures in your posts, you could probably use

    .post img {
    border:1px solid #000;
    }

  3. Diorable
    Member
    Posted 3 years ago #

    hey eridan thanks for the help,

    but unfortunately it didn't work. I placed what you gave me in my CSS but nothing happened. But thanks anyways, do you know any other ways to resolve this?

    Thanks

  4. ladydelaluna
    Member
    Posted 3 years ago #

    it might help us if you could give us a link to the site and maybe tell us what theme you're using...

  5. jonlandrum
    Member
    Posted 3 years ago #

    You could assign images in your posts a class. Similar to eridan's advice, try something like this:
    img.post {
    margin: 5px;
    padding: 10px;
    border: solid black 1px;
    }

    That way only the images with the class "post" will receive the padding, margin, and border.

  6. Diorable
    Member
    Posted 3 years ago #

    thank you all for helping out..
    i took your adivce and assigned a class to my image in my side bar to test it out but nothing happened. I added the tag you gave me in my CSS and still nothing. And i just can't figure out why.

    My site is http://www.diorable.net

    Please help

    thanks

  7. ladydelaluna
    Member
    Posted 3 years ago #

    http://validator.w3.org/check?uri=http://www.diorable.net/

    might want to try clearing up those 78 errors, and see if that helps. my guess is that you have something in the css that's overriding whatever it is you put in there recently. but fixing those errors might just help clear things up enough to get it working properly.

  8. ingalo
    Member
    Posted 3 years ago #

    Try putting:

    p img {
    margin: 5px;
    padding: 10px;
    border: solid black 1px;
    }

    img.wp-smiley {
    border:none;
    }

    into your css file.

    That way you don't have to modify anything but the css file. I hope you don't have a lot ot p's in the sidebar and such :)

    However there should be, for the niceness of look-changing, be a div wrapped around your posts, so if you know a little html you can put

    <div class="post">
    post tags come here
    </div>

    around your post and then style it in the css file with:

    div.post img {
    margin: 5px;
    padding: 10px;
    border: solid black 1px;
    }

    img.wp-smiley {
    border:none;
    }

    Good luck.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags