Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nav menu appearing differently in IE and FF 2

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
Hi all,

If you take a look at you will notice that the navigation menu appears right-aligned in FF (as it should) but it is appearing left-aligned in IE for some reason.

I cannot see why this is happening and it is starting to get me upset :(

I would really appreciate some help with this.

many thanks

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
At a guess, try changing this:

Code:
#menu {
    float: right;
}

to this:

Code:
#menu {
    float: right;
    width: 100%;
}

As I said - it's a guess, and untested... but off the top of my head, it seems like a good bet ;o)

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I'll state it differently. If the ul is 100%, being floated left or right wont matter, since it will always occupy all the space. And that is how IE understands it. Try switching to:
Code:
#menu ul {
    float: right;
    width: auto;
}
This is not tested though.
 
Vrag (or anyone else of course),

I have just found out that the change we made yesterday to right-align the menu has now introduced a horizontal scroll-bar in IE when viewed at 1024x768.

Any suggestions?


Tony
 
This seems to work for me:
Code:
#menu {
	float: right;
	margin-left: 145px;
}
#menu ul {
	float: right;
}

Instead of trying to get stuff to drift to the right on it's own accord (and introducing some box/margin issues) this just constrains the space that te menu is in by getting rid of the left side. The only difference I see is that the menu isn't qute as far to the right in IE6, other than that looks good in IE6 and FF for windows as well as FF for linux. Haven't tried any others.

barcode_1.gif
 
That seems to have done the job - thanks so much Tarwn


Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top