+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Css drop down menu

  1. #1
    vidhem is offline x10Hosting Member vidhem is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    12

    Post Css drop down menu

    Can anyone give me a script for a drop down menu that doesnot causes the whole page to push down...

  2. #2
    gptsven is offline x10 Lieutenant gptsven is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    253

    Re: Css drop down menu

    Quote Originally Posted by vidhem View Post
    Can anyone give me a script for a drop down menu that doesnot causes the whole page to push down...

    try searching css dropdown menu in google, you should check out dynamicdrive.com, they give full scripts for all types of css build items

  3. #3
    quantum1's Avatar
    quantum1 is offline x10Hosting Member quantum1 is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    near Nashville, TN
    Posts
    68

    Re: Css drop down menu

    gptsven, thank you for the dynamic drive link! it rocks! :D
    Two rules of development:
    1) Computers work for people; People do not work for computers
    2) Maintainability is all that matters.

  4. #4
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: Css drop down menu

    all you need to do is position:absolute; a DIV and then use top:; and left:; to place it.

    It won't push the page down.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  5. #5
    vidhem is offline x10Hosting Member vidhem is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    12

    Re: Css drop down menu

    thanks vol7ron and gptsven

  6. #6
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: Css drop down menu

    not sure i helped at all, but using javascript but here's a quick example I'll code up showing how you can get an element's position with javascript:

    HTML Code:
    <div id="menuID" 
       style="background:#f00; color:#fff; border:1px solid black;
              width:15em; position:absolute; z-index:10;" 
       onmouseover="elem=getElementById('submenuID');
              elem.style.top=this.offsetTop + this.offsetHeight + 1 + 'px';
              elem.style.display='block';"
    >
       This is your menu
    </div>
    
    <div id="submenuID" 
       style="background:#f03333; color:#fff; border:1px solid black;
              width:15em; position:absolute; z-index:10; display:none;" 
       onmouseover="this.style.background='#00f';"
       onmouseout="this.style.display='none';"
    >
       This is your submenu
    </div>
    Last edited by vol7ron; 12-11-2008 at 08:28 AM.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  7. #7
    quantum1's Avatar
    quantum1 is offline x10Hosting Member quantum1 is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    near Nashville, TN
    Posts
    68

    Re: Css drop down menu

    http://www.dynamicdrive.com/dynamici...edcollapse.htm

    The link above is from the dynamicdrive page mentioned by gptsven. I created the html and downloaded the javascript and it works great!
    Two rules of development:
    1) Computers work for people; People do not work for computers
    2) Maintainability is all that matters.

  8. #8
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: Css drop down menu

    I have always found this site excellent when trying to create good css techniques - including drop-down menus - which it does for you.

    www.cssplay.co.uk

  9. #9
    vol7ron's Avatar
    vol7ron is offline x10 Lieutenant vol7ron is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    DC
    Posts
    434

    Re: Css drop down menu

    both sites nice, however not really a fan of cssplay. good demonstrations, some errors, but they don't make it so easy to build your own.

    as for dynamic drive, i remember using them a long time ago (around y2k) when DHTML was really popular.
    If you find my post useful please add to my reputation by clicking the +Rep button
    You may also use the Donate link to donate credits - this is appreciated too Thanks to those whom have donated so far!


  10. #10
    freecrm's Avatar
    freecrm is offline x10 Elder freecrm is an unknown quantity at this point
    Join Date
    May 2008
    Location
    UK
    Posts
    629

    Re: Css drop down menu

    I prefer pure css solutions in case JS isn't enabled (which 95% of the time it is).

    A word of warning though with css styling - IE6!

    very simply a big pain and you need to (or should) build in bug fixes for IE.

    If you only have browsers using firefox/chrome/opera/anything else - no need to worry!
    Edit:
    There is a part of cssplay that builds them for you

    http://www.cssplay.co.uk/menus/menu_builder_flyout.html
    Last edited by freecrm; 12-12-2008 at 11:19 AM. Reason: Automerged Doublepost

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. 300 short cuts of Windows XP
    By goodone in forum Computers & Technology
    Replies: 34
    Last Post: 11-29-2011, 12:12 AM
  2. Drop Down Menu -> Mysql
    By White-Fox in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 09-01-2008, 02:20 PM
  3. help!! coding advanced drop down menu
    By zynischen in forum Programming Help
    Replies: 3
    Last Post: 04-25-2008, 05:14 PM
  4. coding advanced drop down menu
    By zynischen in forum Programming Help
    Replies: 0
    Last Post: 04-20-2008, 04:13 AM
  5. Mobile phone Codes
    By greeting in forum Computers & Technology
    Replies: 10
    Last Post: 03-28-2008, 07:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers