html - Can I center a <ul> with left-aligned <li>s? -
I want to focus a list of left-aligned items.
This is what I am currently in:
Which page looks like this looks:
What I really want looks like this:
width: 200px; to #content ul
but the problem is that I have a lot of lists, this and their There is a different width.
To remove me from the content
f So that it can be centered properly or is I going wrong about this?
Thanks for any help you can provide.
Solution
Thank you and the solution here:
Add these four lines to the CSS rules of #content ul
:
Display: -Moz-inline-stack; display: inline-block; zoom: 1; * Display: inline;
I have it in IE6, IE7, IE8 and Firefox 3.6 Have tested. The results look like the second image above and the list always fits the content of the item.
set & lt; Ul & gt;
. See. Display: Inline-block to use
Note that inline-block
is not supported for IE7 (fully) .7.
Comments
Post a Comment