Previous Message
Next Message

Re: [css-d] How to center a list

Sent by Rijk van Geijtenbeek on 27 January 2002 11:11

On Saturday, January 26, 2002, Chris wrote:

C> Hello all. Here's a basic question, Eric!

C> I have an unordered list on my homepage at
C> On 800x600, it looks fine as is. However at higher resolutions it is
C> decidedly towards the left side of the screen whereas everything else is
C> nicely centered and nicely flows from widest at the top of the page to a
C> lonely little link all by itself at the very bottom of the page.

C> Question: how should I move this list over? Should I use a class with
C> different margin settings? Should I use a text-align for the list (is that
C> allowed?)? I don't want every line in the list to be individually centered.
C> I want the whole list to be moved over as is.

CSS doesn't make that easy. See
for possible solutions.

You should somehow constrain the width of the UL element, and then you
use apply "margin-left: auto; margin-right: auto;" to center the list.

 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
Couldn't myself have better it said.
Previous Message
Next Message

Message thread: