Log in

View Full Version : css help (display: block)



imar3l
01-18-2009, 05:23 AM
i need a little help with css.....this is apple style accordion menu for joomla which i
got from here....


http://www.kksou.com/php-gtk2/Joomla/Accordion-Menu-Apple-style.php

my problem is here when i add (display: block) to the css file it became like this...

it adds another like for no reason....


http://i39.tinypic.com/n68dg5.jpg


while mouse is over the menu....


http://i43.tinypic.com/1264mev.jpg


this is the code thats related to that section....



.applemenu div.submenu a:hover {
color: #FFFF99;
font-family: Tahoma, "Lucida Grande", "Trebuchet MS", Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: normal;
font-variant: normal;
background-color: #764500;
text-decoration: none;
display: block;
}



how can i remove the 2nd line...Thanks

Snookerman
01-18-2009, 10:51 AM
The information you provided is not enough:

Please post a link to the page on your site that contains the problematic script or attach your code so we can check it out and help you.

jscheuer1
01-19-2009, 02:21 AM
Using display:block; where it didn't previously exist (expressly or by default) adds a line break. You show it being used for hover. If the non-hovered display isn't block, that will add a line break. There is generally no reason to add display:block; on hover. If the element had display:block; before hover, it will carry that though to the hovered state. If it did not, in most cases it doesn't need it and should not have it on hover.