Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 07-16-2008, 10:54 AM Div Problem
Average Talker

Posts: 24
Trades: 0
I have a div which houses a sub menu for my navigation system. It is only displayed when one of three tabs are hovered over. However, the div is not functioning as it should: instead of displaying where it should with the text inside, firefox renders the container above the text, and the text directly below. The text is in the correct place and works fine, but the box interferes with the tabs because it is positioned on top of the tabs and thus make part of the tabs unclickable. Now, if I try to z-index the subnav div to below the tabs, it fixes the tab problem, but I'm then unable to click the links within the subnav menu.

Code:
#nav {
    position: relative;
    top: 43px;
    left: 100px;
    float:left;
    width:100%;
    line-height:normal;
    }
    
    #nav ul {
        list-style-type: none;
        margin: 0;
        margin-left: 10px;
        padding: 0;
        }
        
    #nav li {
        display: inline;
        position: relative;
        margin: 0;
        padding: 0;
        }
        
    #nav a {
        float: left;
        background: url(../images/tab_left_both.gif) no-repeat left top;
        margin: 0;
        padding: 0 0 0 9px;
        text-decoration: none;
        }
                
                
    #nav a span {
        float: left;
        display: block;
        background: url(../images/tab_right_both.gif) no-repeat right top;
        padding: 5px 14px 5px 5px;
        font-weight: bold;
        color: #FFFFFF;
        }    
    
    #nav li:hover a {
        background-position: 0% -258px;
        }
    
    #nav li:hover span {
        background-position: 100% -258px;
        color: #000000;
        }
        
#header .subnav {
background-color:#FF3366;
    display:none;
    width: 100%;
    position: relative;
    height: 25px;
    line-height: 25px;
    top: 44px;
    color: #FFFFFF;
    text-align: center;
    font-weight: bold;
    z-index:-1;
    }
        
    #header .subnav a, #header .subnav a:visited {
        color: #FFFFFF;
        text-decoration: none;
        }
        
    #header .subnav a:hover {
        text-decoration: underline;
        }
That is my CSS for both the nav menu and the submenu.
The website is http://northvillebasketball.com, if you'd like to see how it doesn't work in firefox. I've made the background color of the DIVs a pinkish color, look for it behind the tabs.

Any help is really appreciated

Thank you!
FuZion is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-16-2008, 12:29 PM Re: Div Problem
Novice Talker

Posts: 14
Name: Rik Weber
Trades: 0
I'm trying to work out why there is roughly a 25px gap at the top of the pink subnav div. If you can reduce the height of that div you should have no problem (and then position the subnav divs about 25px lower).
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
bobming is offline
Reply With Quote
View Public Profile
 
Old 07-16-2008, 12:59 PM Re: Div Problem
Average Talker

Posts: 24
Trades: 0
Well the thing is that pink div and the text are the same div. I'm not sure why it is placing the text in the right place, but the background shows up higher than it is supposed to. Why would the browser place them in different places? This works fine in IE.
FuZion is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Div Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12301 seconds with 12 queries