FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Css - display: block & IE7

 


Jaspa
while I was attempting to construct and style my first menu, I noticed something a bit odd...

With my menus outter container set to 150px wide, I wanted to be able to click anywhere across the width of each link row to follow that link.

Now... by adding: a { display: block; } to the css file and testing in FireFox, that worked fine. But not in IE, I still had to click the text of the link in order to follow it. If I clicked anywhere else in that links row, nothing happend.

However, by adding a background:

a {
display: block;
background: #fff;
}

made IE react the same as FireFox, allowing me to click anywhere across that links row to activate the link.

But I don't understand why adding a background made a difference. Confused

Any info is much appreciated.
Agent ME
Try setting the width property in the css for the a tag and see if that changes it.
sonam
If you don't like background for your menu then you can try to set:

Code:
background : transparent;


Maybe this will solve your problem. Other possibility is to creating new class and use this class for a tag.

Code:
a.navigation{
display: block;
width : 150px;
height : 20px;
}



Sonam
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.