Grow your CSS skills. Land your dream job.

vertical-align

  • # March 26, 2013 at 9:31 am

    http://codepen.io/anon/pen/JxkcK

    How to do that `

      ` would be in vertical-align: middle?
    # March 26, 2013 at 9:35 am

    I’m not sure what you mean.

    What needs to be aligned? The menu, the list items or the links?

    Do you have an example of what you are trying to do?

    # March 26, 2013 at 9:39 am

    I want to do that ul would be in the page horizontal and vertical center.

    # March 26, 2013 at 10:08 am

    Is it the only thing on the page. Frankly without seeing what it is you are trying to do it is hard to help.

    # March 26, 2013 at 12:02 pm

    This might help though: http://css-tricks.com/centering-in-the-unknown/

    # March 26, 2013 at 12:52 pm

    Nothing super new to the concept, just thought a way to do it without `display: table;` or a pseudo element:

    http://codepen.io/Merri/pen/DyuhF

    Downside: can’t use `rem` anymore.

    Unique feature: body element is the element that is centered in the middle, so no need for extra container element.

    # March 26, 2013 at 3:18 pm

    both thx. :)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".