Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2012
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding dropdown at last minute

    I'm building this website, and now I've decided to add a dropdown menu to my Destination tab. How do I do this?


    http://www.cjwebconsulting.com/destination/index.html

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello charisma44,
    You already have CSS in place for what looks like a MegaMenu ...

    Make your markup look like this to start taking advantage of what's in your CSS now -
    Code:
    <ul id="menu">
      <li><a href="index.html">Home</a></li>
     <li><a href="destination.html">Destination</a>
       <div>more stuff</div>
      </li>
     <li><a href="resources.html">Resources</a></li>
     <li><a href="comments.html">Comments</a></li>
     <li><a href="contact.html">Contact</a></li>
    </ul>
    See a simple MegaMenu example here for some ideas. (for some reason I put the MegaMenu on the thumbnails instead of the ul menu at the top. Not sure why, it's not very intuitive that way ... I'll be fixing that sometime soon.)
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Sep 2012
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You have me a little that you have dive tags in it.

    <div>more stuff</div>

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by charisma44 View Post
    You have me a little that you have dive tags in it.

    <div>more stuff</div>
    Yes, like I said...because that's what's already in your CSS. Where did you get
    Code:
    #menu li div {
        position:absolute;
        display:none;
        width:570px;
        padding-bottom:16px;
        border:5px solid #000;
        border-top:0;
        border-radius:0 0 26px 26px;
        top:46px;
        background-color:#fff;
        box-shadow:10px 10px 10px #666;
     }
    #menu li:hover div{
        display:block;
     }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Regular Coder
    Join Date
    Sep 2012
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got it now. I just have to fix it so it's on column of a drop down and not a three column drop down. Thanks


  •  

    Posting Permissions

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