Hey guys! First post! Woooo.Anyways, I'm completely new to html and css and have basically been learning a bit over the past few days in order to make a website.I have cobbled together some code somehow that seems to work and decided that in order to make it run a bit smoother and look a bit snazzier I'd try and include a dropdown bit in the navigation when you hover over it.I tried following <a href="http://www.alistapart.com/articles/dropdowns">this tutorial</a> and a couple of others but unfortunately, I am at a bit of a loss.Would any of you chaps like to help a poor struggling young boy trying to make a pretty website for his girlfriend?For reference, here is the HTML and CSS code I have so far:<b>HTML</b>
<head><link rel = "stylesheet" title = "layout style" type = "text/css" href = "layout.css"></head><body><div id="container"><div id="header"><h1>Third Girl Photography Studios</h1></div><div id="navigation"><ul><li><a href="index.htm">Home</a></li><li><a href="biography.htm">Biography</a></li><li><a href="#">Gallery</a></li><div id="subnavigation"> <ul> <li><a href="gallery1.htm">Gallery 1</a></li> <li><a href="gallery2.htm">Gallery 2</a></li> </ul></div><li><a href="contact.htm">Contact</a></li></ul></div><div id="leftcontent"><h2>Welcome!</h2><p>Welcome friend, please take your time browsing my photography galleries. If you like what you see please head over to the Contact page to book an appointment.</p></div><div id="rightcontent"><img src = "rach.jpg"></div><div id="footer">all copyrights David Billing 2007</div></div></body>
<b>CSS</b>
#container{width: 90%;margin: 30px auto;background-color: #fff;color: #333;border: 1px solid red;line-height: 130%;font-family: tahoma;}#header{padding: .5em;color: white;background-color: red;border-bottom: 1px solid red;text-align:center;}#navigation{padding: .5em;background-color: white;border-bottom: 1px solid red;text-align: center;}#ul{margin: 0;padding: 0;list-style: none;}#subnavigation li{float: left;position: relative;text-decoration: none;padding: .2em 1em;color: white;background-color: red;}#subnavigation li ul{display: none;position: absolute;top: 1em;left: 0;}#subnavigation li > ul{top: auto;left:auto;}#ul li a:hover{color: red;background-color: white;}#subnavigation li:hover ul{display: block;}#top h1{padding: 0;margin: 0;text-align: center;} #leftcontent{float: left;width: 360px;margin: 0;padding: 1em;}#rightcontent{margin-left: 400px;border-left: 1px solid red;padding: 25px;text-align: center;}#footer{clear: both;margin: 0;padding: .5em;color: white;background-color: red;border-top: 1px solid red;text-align: right;}#leftcontent p { margin: 0 0 1em 0; }#rightcontent h2 { margin: 0 0 .5em 0; }
Thanks in advance,Dave