• Hi, im new to wordpress and coding in css and such, im trying to set my blog here and im using the book lite theme, i will include a page with a gallery of my illustrations, id like to have it centered or have the thumbnails be just big enough so its wide ebout that it looks centered, ive tried many things but so far hasnt worked, hope you all can help me

    also, is there a way to have every new ilustration i upload to my posts be automatically added to the gallery page? that would be great

    thank you all

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Here’s a CSS resource for centring
    http://dorward.me.uk/www/centre/

    Thread Starter eggstraordinario

    (@eggstraordinario)

    thank you! i understand what that link says but the only css i found to relate to the gallery was on the style sheet under the .gallery parts, i made many modifications to it, but none of them worked

    The gallery section IS centered — but since you only have 4 items across — the content is narrower than the enclosing element, hence it looks uncentered. Try adding this to your stylesheet:

    .gallery {
       margin: 0 auto;
       width: 610px;
    }
    Thread Starter eggstraordinario

    (@eggstraordinario)

    ive tried it, it didnt work, i set it like this

    #main .gallery {
    margin: 0 auto;
    width: 610px:
    }

    i even deleted the gallery and set it up again after modifying the style

    There is no width set in the CSS — see line 660 of your CSS only shows this:

    #main .gallery {
        margin: 0 auto;
    }

    Perhaps redoing the gallery changed the styles?

    Adding the fixed width to the above CSS DOES work in Firebug. Be sure to clear your browser cache in case that’s affecting the styles being immediately visible.

    Thread Starter eggstraordinario

    (@eggstraordinario)

    i did changed it, i wonder what happened

    There still isn’t a width on that CSS selector…maybe something else in the theme is changing it dynamically??

    See if adding the CSS !important as below works:

    #main .gallery {
        margin: 0 auto;
        width: 610px !important;
    }

    Thread Starter eggstraordinario

    (@eggstraordinario)

    still not working, , thanks anyway, and ill keep my responses to you on this thread, ill just wanted to see if the theme developer said anything about it

    Thread Starter eggstraordinario

    (@eggstraordinario)

    never mind, done, it was a problem with the semicolon, thankyou very much!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘gallery centering on book lite theme?’ is closed to new replies.