Wrox Programmer Forums
|
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2005, 02:47 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default fixed positioning

I'm having a problem with a fixed position element getting in the way of my dropdown menus in Firefox. O.K. as an example lets add
<style type="text/css" media="all">
h1#jts {
    position:fixed;
    top:120px;
    left:5em;
    }
    </style>
    </head>
    <body>
to JTs dinner_menu.html as well as:
<div id='body'>
            <h1 id='jts'>
                JT's at Night
            </h1>
            <div id='content'>

In menu_system.css add a z-index of 2 to the first rule as such:
div#nav {
    position: fixed;
    right: 0;
    left: 0;
    top: 0.8em;
    z-index: 2;
}

This works fine in IE with the ie7 patch, but in Firefox when I move the mouse down the menu, as soon as my mouse moves over the fixed element below the menu disappears.

Any ideas about why this happens and any fixes would be greatly appreciated . I want a nav menu fixed to the top of the screen, as well as a fixed position company name under it.

Thanks in advance
 
Old May 8th, 2005, 10:37 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

I've had some dealings with this bug :-)

I don't remember the exact fix but it involved opacity.

I think I applied an opacity of 0.99 to the containing element for the drop down menus (a transparency so small you don't notice it), and a :hover on the same element that reset opacity to 1.0. This bug also pops up if the menu comes up over an element where the overflow property is set to anything other than visible.

This bug can also be fixed by not using the display or visibility properties, instead position the drop down offscreen using something like left: -2000; or top: -2000; and then reset that value to whatever is correct in the :hover rule (this fix doesn't seem to work for nested submenus though).

I'm pretty sure this bug is fixed in the forthcoming Firefox 1.1.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design





Similar Threads
Thread Thread Starter Forum Replies Last Post
form positioning jeremy1048 Access 2 February 12th, 2008 08:52 AM
positioning issue Adam H-W CSS Cascading Style Sheets 3 January 20th, 2007 07:28 AM
Fixed tables and/or fixed bkgrnd in tables slg111875 Dreamweaver (all versions) 1 June 22nd, 2006 02:31 PM
Positioning Calculations rit01 ASP.NET 1.x and 2.0 Application Design 3 February 22nd, 2006 03:10 PM
Positioning Problem harpua CSS Cascading Style Sheets 5 May 27th, 2005 08:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.