No replies
jbhunter's picture
Last seen: 12 years 1 week ago
Timezone: GMT-5
Joined: 2011-05-21
Posts: 1
Points: 2

I am thinking of using drop down menus from a standard CSS menu bar. I decided to learn on a simple template and after reading some tutorials I am not getting the menu bar to display correctly. I am having two issues, the sub menus are being displayed in the normal bar without a mouse over and when I do mouse over and they drop down vertically they are shifting the rest of the site content which I though they the position:absolute would take care of this issue. Any thoughts.

Here was some of the tutorials I was reading through.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="" xml:lang="en">
  <title>snow_scene template</title>
  <meta name="description" content="website description" />
  <meta name="keywords" content="website keywords, website keywords" />
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" type="text/css" href="style/style.css" />
<!--[if gte IE 5]><![if lt IE 7]>
<style type="text/css">
.navmenu li
  behavior: url( );
  <div id="main">
    <div id="links"></div>
    <div id="header">
      <div id="logo">
        <div id="logo_text">
          <!-- class="blue", allows you to change the colour of the text - other classes are: "green", "orange", "red", "purple" and "yellow" -->
          <h1>snow_<span class="blue">scene</span></h1>
          <h2>A simple, snow scene, website template</h2>
      <div id="menubar">
        <ul id="menu">
          <!-- put class="tab_selected" in the li tag for the selected page - to highlight which page you're on -->
          <li class="tab_selected"><a href="index.html">Home</a></li>
          <li><a href="our_services.html">Our Services</a><ul>
            <li><a href="#.html">One</a></li>
            <li><a href="#.html">Two</a></li>
            <li><a href="#.html">Three</a></li></ul>
          <li><a href="about_us.html">About Us</a></li>  
          <li><a href="styles.html">Styles</a></li>
          <li><a href="contact.html">Contact Us</a></li>
    <div id="site_content">
      <div class="sidebar">
        <!-- insert your sidebar items here -->
        <h1>Latest News</h1>
        <h2>New Website Launched</h2>
        <h3>January 1st, 2010</h3>
        <p>2010 sees the redesign of our website. Take a look around and let us know what you think.<br /><a href="#">Read more</a></p>
        <h1>Useful Links</h1>
          <li><a href="#">link 1</a></li>
          <li><a href="#">link 2</a></li>
          <li><a href="#">link 3</a></li>
          <li><a href="#">link 4</a></li>
        <h1>Useful Info</h1>
        <p>You can put anything you like in the sidebar. Latest news, useful links, images, contact information. Anything you think the visitor will find useful.</p>
      <div id="content">
        <!-- insert the page content here -->
        <h1>Welcome to the snow_scene template</h1>
        <p>This standards compliant, simple, fixed width website template is released as an 'open source' design (under the <a href="">Creative Commons Attribution 3.0 Licence</a>), which means that you are free to download and use it for anything you want (including modifying and amending it). All I ask is that you leave the 'design by dcarter' link in the footer of the template, but other than that...</p>
        <p>This template is written entirely in XHTML 1.1 and CSS, and can be validated using the links in the footer.</p>
        <p>You can view my other 'open source' template designs <a href="">here</a>.</p>
        <p>This template is a fully functional 5 page website, with a <a href="styles.html">styles</a> page that gives examples of all the styles available with this design.</p>
        <h1>Browser Compatibility</h1>
        <p>This template has been tested in the following browsers:</p>
          <li>Internet Explorer 8</li>
          <li>Internet Explorer 7</li>
          <li>FireFox 3</li>
          <li>Google Chrome 2</li>
          <li>Safari 4</li>
    <div id="footer">Copyright &copy; Company Name. All Rights Reserved. | <a href="">XHTML</a> | <a href="">CSS</a> | <a href="">design by dcarter</a></div>

{ height: 100%;}
{ padding: 0;
  margin: 0;}
{ font: normal .80em 'trebuchet ms', arial, sans-serif;
  background: #E8E4E5;
  color: #555;}
{ padding: 0 0 16px 0;
  line-height: 1.7em;}
h1, h2, h3, h4, h5, h6 
{ color: #362C20;
  padding: 0 0 5px 0;}
h1, h4
{ font: normal 165% "century gothic", arial;
  margin: 0 0 15px 0;
  padding: 15px 20px 5px 0;}
h2, h5
{ color: #FA9300;
  padding: 0 0 5px 0;
  font: normal 120% arial;}
h3, h6
{ color: #888;
  font: italic 95% arial;
  padding: 0 0 15px 0;}
h4, h6
{ color: #B60000;}
{ color: #362C20;}
{ border: 0;}
a, a:hover
{ outline: none;
  color: #028FD0;
  text-decoration: underline;}
{ text-decoration: none;}
{ margin: 20px 0 20px 0; 
  padding: 10px 20px 0 20px;
  border: 1px solid #E5E5DB;
  background: #F5F5F1;}
{ margin: 2px 0 18px 16px;}
ul li
{ list-style-type: square;
  margin: 0 0 6px 0; 
  padding: 0 0 0 8px;}
{ margin: 2px 0 0 24px;}
ol li
{ margin: 0 0 6px 0;}
#main, #header, #menubar, #site_content, #footer
{ margin-left: auto; 
  margin-right: auto;}
{ width: 945px;
  background: #E2E2DA url(content.png) repeat-y;
  color: #555;} 
{ background: #C9D3C8;
  color: #FFF;
  width: 905px;
  border-top: 8px solid #FFF;}
{ width: 905px;
  height: 166px;
  position: relative;
  background: #C9D3C8 url(logo.jpg) no-repeat right bottom;
  color: #FFF;}
#logo #logo_text 
{ position: absolute; 
  top: 10px;
  left: 0;}
#logo_text h1
{ font: normal 280% "century gothic", arial;
  padding: 29px 0 0 20px;
  margin: 0;
  text-transform: lowercase;
  color: #FFF;
  background: transparent;}
#logo_text h2
{ font-size: 110%;
  margin: 0;
  padding: 4px 0 0 20px;
  color: #4F4F4F;
  background: transparent;
  text-transform: none;
  letter-spacing: 0.1em;}
{ background: #C9D3C8 url(menu.png) repeat-x;
  width: 872px;
  height: 45px;
  padding: 0 17px 0 16px;} 
{ float: right; 
  margin: 0;}
ul#menu li
{ float: left;
  margin: 7px 0 0 0;
  padding: 0;
  list-style: none;}
ul#menu li a
{ letter-spacing: 0.1em;
  font-size: 105%;
  display: block; 
  float: left; 
  height: 25px;
  text-decoration: none; 
  padding: 8px 22px 5px 22px;
  text-align: center;
  background: transparent;
  color: #FFF;} 
ul#menu li.tab_selected, ul#menu li.tab_selected a:hover
{ background: url(menu_selected.png) repeat-x;
  color: #FFF;}
ul#menu li a:hover
{ background: transparent;
  color: #05B3FB;}
/*Added Here*/
  ul#menu li ul {
	display: inline;
	width: 10em; /* Width to help Opera out */
	background-color: #69f;
ul#menu li:hover li {
	float: none; }
ul#menu li:hover li a {
	background-color: #69f;
	border-bottom: 1px solid #fff;
	color: #000; }
ul#menu li li a:hover {
	background-color: #8db3ff; }
ul#menu ul
  display: none;
ul#menu li:hover > ul
  display: block;
ul#menu ul.parent_hover
  display: block;
/*To Here*/
{ overflow: hidden;} 
{ float: right;
  width: 168px;
  padding: 10px 34px 15px 15px;
  margin-right: 10px;}
.sidebar ul
{ border-top: 1px solid #EEEEEA;
  width: 178px; 
  padding-top: 4px; 
  margin: 4px 0 20px 0;}
.sidebar li
{ list-style: none; 
  padding: 0 0 4px 0; 
  border-bottom: 1px solid #EEEEEA;}
.sidebar li a, .sidebar li a:hover
{ text-decoration: none; 
  padding: 0 0 0 22px;
  display: block;
  background: transparent url(arrow.png) no-repeat left center;
  color: #555;
  border: 0;} 
.sidebar li a.selected, .sidebar li a:hover, .sidebar li a.selected:hover
{ background: transparent url(arrow_select.png) no-repeat left center;
  border: 0;
  color: #028FD0;} 
{ text-align: left;
  width: 640px;
  float: left;
  padding: 10px 10px 40px 35px;}
{ width: 905px;
  height: 40px;
  padding: 22px 0 4px 0;
  text-align: center; 
  background: #595959;
  color: #FFF;
  border-top: 5px solid #85AAAD;}
#footer a, #footer a:hover
{ background: transparent;
  color: #FFF;}
{ color: #F7C015;}
{ color: #05A4D1;}
{ color: #FF7A0F;}
{ color: #C80500;}
{ color: #EB0FFF;}
{ color: #A4AA04;}
{ margin: 15px 0 0 0;}
.form_settings p
{ padding: 0 0 4px 0;}
.form_settings span
{ float: left; 
  width: 200px; 
  text-align: left;}
.form_settings input, .form_settings textarea
{ padding: 2px; 
  width: 299px; 
  font: 100% arial; 
  border: 1px solid #E5E5DB; 
  background: #FFF; 
  color: #47433F;}
.form_settings .submit
{ font: 100% arial; 
  border: 1px solid; 
  width: 99px; 
  margin: 0 0 0 206px; 
  height: 26px;
  padding: 2px 0 3px 0;
  cursor: pointer; 
  background: #595959; 
  color: #FFF;}
.form_settings textarea, .form_settings select
{ font: 100% arial; 
  width: 299px;}
.form_settings select
{ width: 304px;}
.form_settings .checkbox
{ margin: 4px 0; 
  padding: 0; 
  width: 14px;
  border: 0;
  background: none;}
{ width: 100%;
  height: 0;
  border-top: 1px solid #D9D5CF;
  border-bottom: 1px solid #FFF;
  margin: 0 0 20px 0;}
{ margin: 10px 0 30px 0;}
table tr th, table tr td
{ text-align: left;
  background: #595959;
  color: #FFF;
  padding: 7px 4px;}
table tr td
{ background: #CCCCCC;
  color: #47433F;
  border-top: 1px solid #FFF;}