- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello,
I need to figure out how to vertically center the
#wrap ul li { list-style:none;
padding: 2px;
display:block;
line-height: 5px;
}
to the ribbon on this page. Right now it sits pretty much in the vertical center in Firefox and Safari, because I have given a line height to bump it there, but I need the real answer so it’s positioned correctly in all browsers.
Please view the page hear:
http://pittsells.com/sample.htm
Kind regards,
Jon
I think i solved this at work, but unfotunately the code is at work I’ll look into it and return tomorrow if it is indeed the solution.
@Paulie_D Did you mean that you should set the line-height to the same value as the height? The font-size has nothing to do with it.
@pittles78 Try giving the list item a fixed height (rather than using padding) and then match the line-height to that value. That will be as consistent as you can get it cross-browser wise.
Thanks again sl1dr! That was the answer I was looking for.