[Resolved] Vertically Center Copy in Lightweight Grid Columns

Home Forums Support [Resolved] Vertically Center Copy in Lightweight Grid Columns

Home Forums Support Vertically Center Copy in Lightweight Grid Columns

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #327519
    Beau

    I am using Lightweight Grid Columns with the latest version of GP and cannot for the life of me figure out how to make some text centered vertically in a 50% width column.

    Is there any way to do this?

    Thanks!
    Beau

    #327546
    Tom
    Lead Developer
    Lead Developer

    Vertically centering content is very difficult in CSS/HTML unless you know the exact height of what you’re centering. Is there a fixed height or is it dynamic?

    #328137
    Beau

    I keep finding that out! The div would be within a 50% column within one of the sections of a regular static page, so ultimately the height would be dynamic based on the screen width. I suppose I could set the height of the div, which could change based on screen width?

    #328264
    Tom
    Lead Developer
    Lead Developer
    #329100
    Beau

    Ya I did see that thanks, but that only works with a static height for the parent element. Do you know of any way I could make the element’s height based on the height of the image in the other column?

    #329153
    Tom
    Lead Developer
    Lead Developer

    I don’t believe that would be possible without using something like javascript.

    #329312
    Beau

    Cool thanks Tom!

    #329388
    Tom
    Lead Developer
    Lead Developer

    No problem!

    #401575
    Maxwell

    Any chance of an update to LCG with flexbox?

    #401698
    Tom
    Lead Developer
    Lead Developer

    Possibly, but this is a great alternative: https://en-ca.wordpress.org/plugins/gridable/

    #680979
    Brian

    Tried this but it cuts off some of the text when in mobile.
    I used http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ but I couldn’t get it any better. Currently having the problem on https://bttestserver.com/ Could anybody help?

    Kind Regards,

    Brian Thompson

    #680981
    David
    Staff
    Customer Support

    Hi Brian,

    could you raise a new topic, it just saves previous users being copied in on responses and makes it easier for us to track.

    #680993
    Brian

    ok. Thanks.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.