• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

always center my image in the div, portfolio page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › always center my image in the div, portfolio page

This topic is: not resolved

Tagged: always center, image, portfolio

  • This topic has 6 replies, 3 voices, and was last updated 9 years, 11 months ago by mmjaeger.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • June 27, 2016 at 2:15 am #188361
    martijn
    Member

    Hello,

    This is my first post so if i do anything that isn't allowed please tell me!
    Ok so here is the problem!

    I am making a new website for a client who is a painter.
    She got a portfolio page were she puts up all the paintings she created, you can find that page over here http://www.striktonline.nl/herma/portfolio_herma/

    The problem is the painting's all have different sizes, so we decided we want all the paintings in a square, and ones you click on them you can see the full painting!
    Great that works so far!

    BUT, there is a problem, because the focus of the painting is always in the center of the image the portfolio page is not good because some paintings you see just a little piece of the head...
    (you can see that with the bold guy painting, its the 8 painting if you start on the top.)

    What i am searching for is a little bit of css that always puts the img in the center of the div. so you always see the middle of the painting.

    Hope someone can help me!

    If you need any other information please tell me!
    This is my first post so i dont know so good how this works...

    With kind regards,
    Martijn

    http://www.striktonline.nl/herma/portfolio_herma/
    June 27, 2016 at 7:18 am #188374
    mmjaeger
    Member

    You may want to look into flex box.

    if you add the following to the figure tag, it should work:

    figure {
    display: flex;
    align-items: center;
    }
    June 27, 2016 at 9:07 am #188380
    brock
    Member

    Cool design by the way.

    June 28, 2016 at 2:18 am #188425
    martijn
    Member

    Thank you for the compliment! thats really nice

    June 28, 2016 at 2:19 am #188427
    martijn
    Member

    Thanks for the reply,

    I tried adding you css. add !important because there is still alot of cleanup to do in the css but the sad thing is it's not working.

    figure {
    display: flex!important;
    align-items: center!important;
    }

    Did i miss something or do something wrong?

    Thanks in advance you'r really helping me with this project as its deadline is already in the past!

    July 1, 2016 at 4:19 am #188713
    martijn
    Member

    Can somebody please take a look at this..

    hope somebody can give me some help!

    thank you so much

    July 1, 2016 at 7:31 am #188722
    mmjaeger
    Member

    first thing I would do is cleaning up your html code - your using an unordered list - the correct html code would be
    <ul><li>Picture</li><li>Picture</li><li>Picture</li></ul>;

    you have something like this:
    <ul><div><li>Picture</li></div><div><li>Picture</li></div><div><li>Picture</li></div></ul>;

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble