Sent by David Hucklesby on 5 February 2010 02:02
On 2/4/10 2:31 PM, Laurie Landry wrote:
> For this page:
>
> http://laurielandry.com/homepage.html
>
> and using the subsequent CSS
http://laurielandry.com/assets/templates/laurielandry/css/primary_test.css
> , I'm trying to figure out why the UL is shift over.
>
> In some browsers, the links are centered with the white box as
> desired, but in Firefox 2.0 (PC) the navigation links is shifted over
> in the correct positioning with the UL area.
>
> I want the UL (outlined in red) to be centered with the white box, not
> shifted over so much.
>
> I'm really stumped on why this is happening, and how to correct it.
>
Missing from my earlier reply--
The UL is positioned to the right because of this rule:
/* position the UL from the left by half the container width */
div.navcontainer ul {
....
left: 50%;
position: relative;
....
}
You then attempt to center the links by this rule:
/* position the LIs away from the right by half the UL width */
div.navcontainer ul li {
float: left;
....
position: relative;
right: 50%;
}
But Firefox 2 seems to ignore the 'position: relative;' - apparently
because of the 'float: left;' declaration.
If you move the float declaration and margins from the LIs to the rule
for 'div.navcontainer ul li a' I think you'll find browsers agree. (Not
well tested.)
Hopefully my previous suggestion works for you.
Cordially,
David
--
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
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/