Jump to content

Center a li or div with an unspecified width


TheFilmGod

Recommended Posts

How can I center an li or div without a specified width?

 

I can do display: inline-block; or display: table; FF2 doesn't support inline-block; so I don't mind using display: table. IE7 doesn't support either. Is there a way to simulate the display: table; effect in IE7 without adding extra markup?

display: table; or display: inline-block; are viable solutions for FF users.

 

IE doesn't support table. It will not display divs, li, or other block level elements with display: inline-block. Only elemnts that were initially inline, can inherit the inline-block property.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.