Dave M G wrote: > In the current layout, the menu has an absolute position, and is > oriented to the top right of the viewport. > > If the viewport is shrunk to below 500 pixels, the layout breaks. I > tried setting a minimum width on the <body> tag, but this has no > influence over an item that is absolutely positioned to the right. As > the page is shrunk, all relatively positioned objects stop moving, but > the absolutely positioned objects will continue to place themselves in > absolute terms from the viewport boundaries. Which, of course, is the > expected behavior. > > As far as I can understand it, my only choice to make the menu obey the > min-width of the <body> is to make it relatively positioned. Applying max-width: 100% to the navigation div will restrict it to be no wider than the <body>, even when absolutely positioned. (You'll need appropriate hackery to work this in IE<7).
Your menu will then grow vertically, which may cause it to overlap the content beneath it. You could restrict it's height, and apply overflow: hidden so it can't mask your content, but this would mean part of the menu was no longer visible. You might, however, be able to do something clever with javascript to detect the menu's height and adjust the top position/margin of your content accordingly, which would keep the menu accessible to 90+% of your audience. However I'm no JS expert so can't help you with how that might be done ;-) > But surely it's quite common to want a > menu on the top right in the design, and near the end of the HTML. > While it's common and relatively easy to move a menu around this way when it's going to be positioned to the left (you'll get a horizontal scrollbar at small viewport sizes), as you've found positioning it to the right, while keeping it accessible at smaller viewport sizes, is more tricky! -- Sophie Dennis, Creative Director Cayenne Web Development Limited www.cayenne.co.uk Bloxham Mill, Barford Road Bloxham, Oxfordshire OX15 4FF t. 0870 389 0570 m: 07814 026632 Reg. England and Wales no. 4502369 ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
