CSS nested elements deactivating links. Help please!
Posted: 20 November 2009 10:01 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2009-11-20

I’m having a problem with my links becoming deactive within some nested elements. I followed some instruction on creating rounded corner boxes via a tutorial by Andy Budd. Anyway, it all works great except when I wrap link tags around a few pieces of copy. I’m a bit of a beginner still so maybe this is a simple fix but I’ve spent over a days worth of time now trying to figure it out on my own and can’t seem to get it.

Just to clear this up, the links work everywhere on the page outside of the “box” element I’ll list below and I’ve double and triple checked that the link within the “box” element is written correctly and it is. The CSS even finds the link and styles it correctly, however, the mouse function seems to be disabled. Does this all make sense? Below is the CSS, any help would be greatly appreciated…

This is the code that creates the box and it works correctly…

.box {
    width
:831px;
    
background:url(../imgs/box-spacer.gifrepeat-y;
}

.box h1 {
    background
:url(../imgs/box-top.gifno-repeat left top;
    
padding-top:40px;
    
font-weightnormal;
    
}

.box .last {
    background
:url(../imgs/box-bottom.gifno-repeat left bottom;
    
padding-bottom:60px;
    
}
.box h1, .box p {
    padding
-left:60px;
    
padding-right:60px;

And this is the code I used to test that the page is seeing it as a link…

.box h1 a:link {
    color
:#00CCFF;
}

.box h1 a:hover {
    color
#FF0066;

It changes the color correctly but the hover doesn’t work and if you click, it doesn’t link you anywhere. Again, the link is written correctly on the page. Can anyone help please? I appreciate it. Also, the website is up at http://www.fiddlergroup.com/zygote if it helps. The particular page I was using for testing is the “what’s in a name” page. As you’ll see, all the code and pages and what not is all very simple, just can’t seem to figure out how to fix this one odd issue.

Profile