I have to reproduce a menu like this:
+----------------------------------------------------------------------------+
Option 1 | Option 2 | Option 3 | Option 4 | Option 5
+----------------------------------------------------------------------------+
But actually I have this:
+----------------------------------------------------------------------------+
Option 1 | Option 2 | Option 3 | Option 4 | Option 5
+----------------------------------------------------------------------------+
My code:
<ul>
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
<li>Option 4</li>
<li>Option 5</li>
</ul>
My actual css for that code is:
ul { list-style: none outside none; margin:0; padding: 0; }
li { float: left; margin: 0 10px; }
How I can do it?
PD: IE7 alternative if possible.
Thank you in advance!
Use this code for the li
s instead:
li { margin: 0 10px; display: inline; }
And center your ul
s' contents:
ul { list-style: none outside none; margin:0; padding: 0; text-align: center; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With