Answer the question
In order to leave comments, you need to log in
css and text vertical alignment
actually the question is this - I make up the menu, respectively, through ul and li. there are multi-line items, lines are separated by br's. the problem is that the height of the paragraph is fixed, and the text is allowed in 2 lines not centered. searching the Internet, I found only about vertical-align and line-height, the first effect is zero, the second did not suit. how to do it right?
Answer the question
In order to leave comments, you need to log in
Yes, you need to change the display property, here phrogz.net/css/vertical-align/index.html explains how it works well.
vertical-align applies to table elements, so the effect is null for a list.
You can try playing around with the "display" property of the elements.
Yes, you need to do li{display:inline-block} (google how to do crossbrowser), then vertical-align:middle will work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question