Previous Message
Next Message

[css-d] RE: how to center a listt

Sent by Chris on 27 January 2002 12:12


Message: 9
Date: Sun, 27 Jan 2002 17:29:36 +0100
From: Rijk van Geijtenbeek [EMAIL-REMOVED]>
Reply-To: Rijk van Geijtenbeek [EMAIL-REMOVED]>
To: [EMAIL-REMOVED]
Subject: Re: [css-d] How to center a list

On Saturday, January 26, 2002, Chris wrote:

CSS doesn't make that easy. See
http://allmyfaqs.com/cgi-bin/wiki.pl?Center_with_CSS
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, you weren't kidding about css not making it easy. Either the solutions
you suggest don't work, or I am not implementing them correctly. I tried
setting the width at 85% for the ul in the stylesheet, and it had no effect.
So then I tried putting a div with constrained width with the ul inside the
div. That didn't work either. Is it possible that it is illegal or
impossible to horizontally center an unordered list element without
centering the individual lines?  I KNOW! I'LL USE "BLOCKQUOTE"  (just
kidding, maybe).

I also tried setting left and right margins for the list. That works for
particular resolutions, but it is not very "liquid". I know, I know, stop
worrying about how it looks...but hey, this is my homepage we're talking
about! Why is it so difficult to center a blankety-blank expletive deleted
list?
Previous Message
Next Message

Message thread: