WordPress.org

Ready to get started?Download WordPress

Forums

gallery centering on book lite theme? (10 posts)

  1. eggstraordinario
    Member
    Posted 1 year ago #

    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

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  3. eggstraordinario
    Member
    Posted 1 year ago #

    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

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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;
    }
  5. eggstraordinario
    Member
    Posted 1 year ago #

    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

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  7. eggstraordinario
    Member
    Posted 1 year ago #

    i did changed it, i wonder what happened

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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;
    }
  9. eggstraordinario
    Member
    Posted 1 year ago #

    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

  10. eggstraordinario
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic