I wish to apologize for the accidental cross-posting and state for the
record that I hate this thing where the reply-to goes to the original
recipient rather than the list.


---------- Forwarded message ----------
From: Ghodmode <ghodm...@ghodmode.com>
Date: Wed, Jul 20, 2011 at 6:50 AM
Subject: Re: [css-d] Newbie has big CSS AND cross browser issues
To: Bobbi Ashley <roberta.ash...@comcast.net>


On Wed, Jul 20, 2011 at 4:47 AM, Bobbi Ashley
<roberta.ash...@comcast.net> wrote:
>
> Let me preface this with I am certainly not knowledgeable with website 
> writing.
>
>
>
> At http://www.oneafricasafaris.com/index4.html I have a brown, yellow 
> bordered strip that is supposed to contain a menu.  BUT:
>
> I can't get the menu centered.
>
> In Firefox the text in the container beneath the strip is centered (left 
> aligned) but in Chrome and IE it is not.
>
>
>
> I have stared at this page for 2 days now and still don't know what to do.  I 
> would like
>
> 1.  The strip to be narrow without the jaggedness around the menu.
>
> 2.  The text underneath to be placed in the center of the page and left 
> aligned.

Add the following to your ul styles:

   width: 800px
   margin: 0 auto;
   overflow: hidden;
   padding: 0;

The width is the width of the elements it contains.  Without that,
it's a block and it takes up the full width of the block that contains
it.

The margin centers the ul.

The overflow setting makes it fully contain the list items, even
though they're floated.

The padding removes some default padding that would otherwise shift
your list items to the right.


Normally, float:left is done for the list items, not the anchors.  It
seems to work in your case, but I's still take the property off of the
anchors and add it to the list items.

You said you wanted it to be left-aligned, so remove text-align:center
from both the div.navbar and anchor styles.  Incidentally, I think it
looks nicer centered, but that's not what you asked for :)

Add line-height:20px to your anchor styles.  That will center the text
vertically.

--
Ghodmode
http://www.ghodmode.com/blog
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to