css help please

Out of context: Reply #4

  • Started
  • Last post
  • 6 Responses
  • matt310

    I think the anchors might be the answer, if not, your...

    #subNavList li

    has a padding top of 5px which might be adding to that top space. also, you are using display as block for that li - it's always good to define a height and width when you use display: block - then set you line-height to the same as your height and the text will auto center vertically. like this:

    #subNavList li {
    display: block:
    width: 100px;
    height: 30px;
    line-height: 30px;
    }

    • then you don't have to worry about padding or margin - unless you want some on the outside li boxmatt31
    • Good call Matt.pylon
    • it is handy trick i like to usematt31

View thread