Jump to content

Menu Float


driz

Recommended Posts

the whole site is 800px wide, but the nav is offset by quite a bit from the right hand side
Not quite. Some of your content divs may be 800px, but your header and footer span the whole viewport. That's why the gray and purple areas go from edge to edge. Your navigation div is not contained by anything except the viewport. So when it floats right, it floats against the right side of the view port. You're only noticing the space between the right side of the menu and right side of the viewport. Of course that's not 800px. You have to measure from the left side of the menu to the edge of the viewport. Surprise: 800 px. I didn't just guess at that. I took a snapshot and measured it in Photoshop.Could be I'm wrong about the effect, but those numbers are correct, and the way I've described your layout is correct.
Link to comment
Share on other sites

I'll put it another way. To get what you want, the navigation div should probably be 800px wide, centered. The navigation ul should probably have no assigned width. Now, floating the ul to the right will position it where you want.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...