WordPress.org

Ready to get started?Download WordPress

Forums

Controlling space between images (9 posts)

  1. VPhoto
    Member
    Posted 1 year ago #

    I am a photographer who mainly posts photos on my wordpress blog. I want to control the space in between each photo that I post on my blog.

    How can I set the space inbetween each image and can I specify a number of pixels of space that I want? For example 10 pixels between each image.

  2. catacaustic
    Member
    Posted 1 year ago #

    You'd need to change the CSS style for images to get that to happen. Without being able to see your site or what you've got there, you can try something like:

    img {
        margin: 5px;
    }

    That will put a 5-pixel margin on each side, so everything will be 10 pixels away from each other.

  3. VPhoto
    Member
    Posted 1 year ago #

    cool thanks so much! My site is http://www.weddingdocumentary.com/blog
    I will go back through hundreds of posts and do that code so that the images are exactly the right distance apart from one another.
    Thanks again!

  4. catacaustic
    Member
    Posted 1 year ago #

    You shouldn't need to go back through all of the images and do it automatically. If you can set up a CSS style in your styles.css and that will work for all of the images. But, it's hard to see just where it's going to be used because when I looked through a few of the posts on your site I couldn't see many images.

  5. VPhoto
    Member
    Posted 1 year ago #

    Yeah we do a mix of posts with images and then other posts with videos etc. But most, like 90% of our posts are photos only. So where would I put that CSS so that it would automatically space the images by 10 pixels each?

  6. catacaustic
    Member
    Posted 1 year ago #

    As I said, somewhere in your themes styles.css file. BUT... Don't add it just as I've done there because that will add the margin around every image on the page, not just inside the blog posts. You'll need to look at a differnt CSS selector to do that. As an example (and probably not a good one...)

    #primary img {
        margin: 5px;
    }

    That will add the margin to every img tag that's inside the div tag with the ID of primary. I've found the best way to see where things are is to use FireBug to check where everything is nested.

  7. VPhoto
    Member
    Posted 1 year ago #

    Thanks again for all your help. Now out of curiosity if I wanted to hire someone to help me do these types of things where would I post to find them and approximately how much would one charge for this type of customizing? I am sure there are lots of other things I should be fixing as well. I am just too afraid to break anything so things have been neglected.

  8. catacaustic
    Member
    Posted 1 year ago #

    http://jobs.wordpress.net/

    That's the standard go-to job board around here. As for charges, it doesn't sound like it's a big job so I can't see it being expensive. The best way is ot ask on there and see what responses you get. There's a lot of good designers and developers on there that can help out.

  9. VPhoto
    Member
    Posted 1 year ago #

    thank you again. Very helpful!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags