Results 1 to 3 of 3

Thread: css help (display: block)

  1. #1
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default css help (display: block)

    i need a little help with css.....this is apple style accordion menu for joomla which i
    got from here....

    Code:
    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....





    while mouse is over the menu....





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

    Code:
    .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

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    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.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,925
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •