SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Auto Width Sitepoint Menu

    hi

    i m using this tutorial for drop down menus

    http://www.sitepoint.com/make-a-mega...u-with-jquery/

    How can i make the drop down menu div auto width

    i tried
    Code:
    ul#menu li.mega div {
    border: 1px solid #dda;
    width: auto;
    position: absolute;
    top: 1.6em;
    left: 0em;
    padding: 1.3em;
    background: #ffc;
    color: #930;
    }
    but it didnt worked for me as auto width

    http://wdpixels.com/stuff/sitepoint/completed.html

    vineet

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,168
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Can you show us your example?

  3. #3
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Can you show us your example?
    I posted it in the thread also.

    here it is again

    http://wdpixels.com/stuff/sitepoint/completed.html

    i want drop down menu to expand horizontally based on content

    vineet

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,168
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    O, sorry ... I thought it was a SitePoint link.

    You could try something like this:

    Code:
    ul#menu li.hovering div {
      display: table;
    }

  5. #5
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    hi ralph

    i tried display:table but nothing happens in firefox.

    In IE-7 nothing the drop downs didnt even show up. They got hide in IE-7.

    updated in this link below

    http://wdpixels.com/stuff/sitepoint/completed.html

    vineet


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
  •