Support » Fixing WordPress » want to alter the gallery layout

  • 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?


Viewing 5 replies - 1 through 5 (of 5 total)
  • view the source of the post with the gallery and look for any attached or embedded css.

    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

    can you post a link to your site?

    @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;

    @nathanrice: 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 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘want to alter the gallery layout’ is closed to new replies.