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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2011
    Posts
    135
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Drop down menu's

    How do I add drop down menu's to an all ready made menu? This is what I have all ready.


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    <link rel="stylesheet" type="text/css" href="css/main.css" />
    </head>
    
    <body>
    
    <div id="body">
    
    
    <table width="706" border="1" align="center">
      <tr>
        <td width="696" align="center"><img src="images/banner.jpg" width="682" height="229" alt="banner"></td>
      </tr>
      <tr>
        <td align="center"><ul>
    <li><a href="#">Home</a></li>
    <li><a href="#">Destinations</a></li>
    <li><a href="#">Lodging</a></li>
    <li><a href="#">Transportation</a></li>
    <li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
    <li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
    </ul></td>
      </tr>
      <tr>
        <td align="center"><img src="images/500.jpg" width="700" height="250"></td>
      </tr>
      <tr>
        <td align="center"><img src="images/250.jpg" width="350" height="125"><img src="images/250.jpg" width="350" height="125"></td>
      </tr>
      <tr>
        <td align="center"><img src="images/250.jpg" width="350" height="125"><img src="images/250.jpg" width="350" height="125"></td>
      </tr>
      <tr>
        <td height="60" align="center"><img src="images/100.jpg" width="233" height="75"><img src="images/100.jpg" width="233" height="75"><img src="images/100.jpg" width="233" height="75"></td>
      </tr>
      <tr>
        <td align="center"><img src="images/100.jpg" width="233" height="75"><img src="images/100.jpg" width="233" height="75"><img src="images/100.jpg" width="233" height="75"></td>
      </tr>
      <tr>
      <div id="content">
        <td>      <blockquote>
            <h3>Accessible Destinations</h3>
            <p>        Accessible Destinations is an informational website that provides listings of hotels in vacation spots that have accessible accommodations.   Also provides accessible transportation information. </p>
          </blockquote></td>
        </div>
      </tr>
      <tr>
        <td height="25" align="center"><h3>Footer</h3></td>
      </tr>
    </table>
    
    
    </div>
    
    
    </body>
    </html>

    Code:
    @charset "UTF-8";
    /* CSS Document */
    
    #body{
    	background-color:#9C6;
    }
    
    /* --- navigation starts --- */
    
    b	body {color:black;}
    ody{background-color : AA0000; color : #FFFFFF;font-family : tahoma;}
    ul{list-style-type : none;}
    ul li{display : inline; margin : 2px 1px 2px 0;}
    ul li a{color : #000; padding:3px 8px; text-decoration : none; border : 1px solid #000; background-color : #FFFFFF;}
    ul li a:hover{color : #FFF; background-color : #000; border : 1px solid #FFFFFF;}
    
    /* --- navigation ends --- */
    
    /* --- information starts --- */
    
    #content{
    	font-size:16px;
    	font:Verdana, Geneva, sans-serif;}
    	.textindent {
     text-indent: 10px;
     }
     
     
    
    /* --- information ends --- */

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Charisma,
    You can easily add to that menu with just a few extra lines.
    Here's an example:
    Markup -
    Code:
        <ul>
            <li><a href="#">Home</a></li>
            <li><a href="#">Destinations</a></li>
            <li><a href="#">Lodging</a>
                <ul>
                    <li><a href="#">drop</a></li>
                    <li><a href="#">drop</a></li>
                    <li><a href="#">drop</a></li>
                    <li><a href="#">drop</a></li>
                </ul>
            </li>
            <li><a href="#">Transportation</a></li>
            <li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
            <li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
        </ul>
    And some CSS to go with that -
    Code:
    ul { list-style-type : none; }
    ul li {
    	float: left;
    	margin : 2px 1px 2px 0;
    	position: relative;
    }
    ul li a {
    	color : #000;
    	padding:3px 8px;
    	text-decoration : none;
    	border : 1px solid #000;
    	background-color : #FFFFFF;
    }
    ul li a:hover {
    	color : #FFF;
    	background-color : #000;
    	border : 1px solid #FFFFFF;
    }
    	/*style drops here*/
    			ul ul {
    				position: absolute;
    				margin: 0;
    				padding: 0;
    				left: 0;
    				top: 23px;
    				visibility: hidden;
    			}
    				ul li:hover ul {visibility: visible;}
    ul ul li {
    	background: #fff;
    	border: 1px solid #000;
    }
    
    /* --- navigation ends --- */
    You can see a better example of that dropdown method here.

    You should have a look at the links in my signature line. The link about tables especially.
    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
    Oct 2011
    Posts
    135
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thank you very much.


  •  

    Posting Permissions

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