WordPress.org

Ready to get started?Download WordPress

Forums

want to alter the gallery layout (6 posts)

  1. PLWatts
    Member
    Posted 6 years ago #

    Hi all
    I am trying to alter the styling that is added to a post when you are attaching a gallery to that post...can anyone tell me what file I need to look in and work with to set up the gallery in line with the style of my site in WordPress 2.5?

    Thanks,
    Trisha

  2. nathanrice
    Member
    Posted 6 years ago #

    view the source of the post with the gallery and look for any attached or embedded css.

  3. PLWatts
    Member
    Posted 6 years ago #

    I viewed the source and saw that there was embedded but I don't know where to find the file that caused this to be embedded...it is an inline style that is only added to the posts that have a gallery

  4. nathanrice
    Member
    Posted 6 years ago #

    can you post a link to your site?

  5. anotherjpeg
    Member
    Posted 6 years ago #

    @PLWatts - if you look in the wp-includes folder there is a file called media.php

    Scroll down near the end and you'll find the gallery styles that are being inserted into your posts. You can tweak it there.

    <style type='text/css'>
    .gallery {
    margin: auto;
    }
    .gallery-item {
    float: left;
    margin-top: 10px;
    text-align: center;
    width: {$itemwidth}%; }
    .gallery img {
    border: 2px solid #cfcfcf;
    }
    .gallery-caption {
    margin-left: 0;
    }
    </style>

  6. PLWatts
    Member
    Posted 6 years ago #

    @nathanrice: http://www.babygotblog.com right now it is the default theme as I get everything moved over and such...cute theme will make a return soon.

    @anotherjpeg: thanks so much. I will be tweaking that CSS very, very soon :-)

Topic Closed

This topic has been closed to new replies.

About this Topic