views:

19

answers:

2

http://www.briligg.com/toll.html

The last 3 list items in the text section only show as links when your mouse is over the far right side of them. That is the only place that triggers the :hover background color change, too. The first 2 work fine. The css validates. There are a bunch of validation errors in the html, but nothing significant.

I can´t figure it out.

The relevant css is from line 66 to 121 in the briligg.css document, and line 9 to 47 of the head section of the html doc. The html code is from line 79 to 117.

external css:

.menutop, .menubottom, .menunow  {
        float: left;
        width: 120px;
        position: absolute;
    }
.menutop li, .menubottom li {
    list-style: none;
    position: absolute;
    left: 0;
    margin: 10px 14px 5px 14px;
    }
.menunow li {
    border-bottom: 5px solid #52473f;
    border-top: 10px solid #52473f;
    border-left: 14px solid #52473f;
    border-right: 14px solid #52473f;
    outline: #3b3b3b solid 1px;
    padding-bottom: 3px;
    list-style: none;
    position: absolute;
    left: 0;
    }
.menutop li, .menutop a, .menubottom li, .menubottom a {
    width: 120px;
        height: 120px;
        display: block;
    }
div.textmenu {
        float: left;
        width: 150px;
        margin: 30px 10px 0 10px;
        position: relative;
        }
ul.textmenu {
        position: absolute;
        left: 0;
        }
li.textmenu {
        background-color: #52473f;
        margin-bottom: 3px;
        padding: 5px 7px;
        border: 1px solid #3b3b3b;
        width: 134px;
        list-style: none;
        text-align: right;
        color: #fd8ee2;
        }
li.textmenu a {
        text-decoration: none;
        color: #fd8ee2;
        }
li.textmenu:hover {
        background-color: #3b3b3b;
        }

internal css:

.menutop {
    height: 120px;
    }
.menunow {
    height: 120px;
    top: 140px;
    }
#frailty {
    top: 0;
    }
#frailty {
    background: url(images/legdrugnav.png) 0 0;
    }
#toll {
    top: 0;
    }
#toll {
    background: url(images/legdrugnav.png) 0 -120px;
    }
#option {
    top: 135px;
    }
#option {
    background: url(images/legdrugnav.png) 0 -240px;
    }
#weighing {
    top: 270px;
    }
#weighing {
    background: url(images/legdrugnav.png) 0 -360px;
    }
ul.textmenu {
    top: 275px;
    }
.menubottom {
    height: 270px;
    position: absolute;
    top: 380px;
    }

html:

<div class="textmenu">
<ul class="menutop">
    <li class="menutop" id="frailty" title="Drug Use and Abuse">
        <a href="frailty.html"></a>
    </li>
</ul>
<ul class="menunow">
    <li class="menunow" id="toll">
        <a href="toll.html"></a>
    </li>
</ul>
<ul class="textmenu">
    <li class="textmenu">
        <a href="toll.html#organized-crime">Prohibition funds organized crime</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#corruption">Prohibition causes corruption</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#kills">Prohibition kills</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#poverty">Prohibition means poverty</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#waste">Prohibition means wasted resources</a>
    </li>
</ul>
<ul class="menubottom">
<li class="menubottom" id="option" title="the option">
<a href="option.html"></a>
</li>
<li id="weighing" title="the pros and cons">
<a href="weighing.html"></a>
</li>
</ul>
</div>
+1  A: 

You have an <ul> with the class menubottom overlap your navigation, hence preventing the underlaying <a>-Elements from receiving the mouse-overevent.

With Firefox + Firebug Addon youc an easily see this if you use the Element Selector and move above that links (only left 3/4 of the links are affected)

alt text

Tseng
I can´t see why it overlaps...
briligg
Is it because i put an absolute positioned element inside another absolute positioned element?
briligg
I guess so, because changing that fixed the problem.
briligg
In the external style sheet, i deleted ´position: absolute´ from the menubottom li selector declarations, and changed the internal stylesheet to say ul.menubottom { height: 270px; position: absolute; top: 520px; }
briligg
but now the 2 .menubottom li-s have switched places...
briligg
No - that wasn´t it.
briligg
A: 

It´s because i didn´t specify class="menubottom" in the 2nd li element for the menubottom ul. Doh!

briligg