Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How do I vertically align a ul to the middle of the page?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #36884
    highlight
    Member

    Ok. I can’t gnaw on this any more. For some reason the answer does not seem straight forward and being a novice I am not sure where I am going wrong. I am just trying to get a ul with 5 li to a) vertically align and center in itself and b) center to the middle of the page. I know this can not be that hard. This is just sandbox to work things out so the code is probably a mess.

    #list-box {
    background-color: red;
    height: 120px;
    width: 60px;
    margin: auto;
    position: relative;
    }

    #list {
    height: 120px;
    width: 60px;
    font: 20px verdana,sans-serif;
    list-style-type: none;
    }

    here is the fiddle if you are interested.

    jsfiddle

    Sorry. I figured it out.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.