Create a vertically centred horizontal navigation

Centring block level elements is easy, just define a width and set margin:0 auto;, but what if you don’t know that fixed width? You could use text-align:center;, but that won’t work on 100%-width block-level elements either… that’ll only work on text-level elements.

VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Leave a Reply

Your email address will not be published. Required fields are marked *