Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Closed Thread
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 02-13-2012, 05:30 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-03-11
Posts: 120
iTrader: 0 / 0%
Div ID Floating to the top?

Hello,


I am new to HTML and CSS. So far I have constructed a basic webpage. However one of my div ids (named links) has floated on top of the top section of my "content" div id. Can someone please explain? Thanks.

HTML Code:
<body> <div id= "main" align="center"> <div id="header"> </div> <ul id="nav"> </ul> <div id="leftad"> </div> <div id="content"> <div class="product"> <p> </p> </div> <div class="product"> <p> </p> </div> <div class="product"> <p> </p> </div> <div class="product"> <p> </p> </div> <div class="product"> </div> <div class="product"> </div> <div class="product"> </div> <div class="product"> </div> <div class="product"> </div> </div> <div id="links"> these are the links </div> <div id="bottomad"> this is the bottom ad </div> <div id="footer"> this is the footer </div> <div id="footerimage"> this is the footer image </div> </div> </body> </html>

Code:
#main{ width:1002px; text-align:left; margin: auto; } #header { background-image:url(images/header.jpg); background-repeat:no-repeat; height:300px; width:1000px; margin: auto; border-style:solid; border-width:1px; } #nav { width: 1000px; margin-top:auto; margin-bottom: auto; margin-right: auto; margin-left: auto; padding: 0; list-style: none; background-color: #FFFFFF; height: 50px; font-family: Palatino Arial; border-right: 1px solid; border-left: 1px solid; } #nav li { float: left; } #nav li a { display: block; padding: 15px 15px; text-decoration: none; font-weight: bold; color: #000000; border-right: 1px solid #ccc; } #nav li a:hover { color: #c00; background-color: #fff; } #leftad{ float:left; width:160px; height:1200px; } #content{ float:right; width:840px; height:1200px; border-style:solid; border-width:1px; } .product { float:left; width: 33%; height: 400px; border-style:solid; border-width:1px; text-align: center; } .clear { clear: both; } #links{ width: 990px; height: 100px; border-width:1px; border-style:solid; margin: auto; } #bottomad{ width: 990px; height: 100px; margin: auto; clear: both; } #footer{ width: 990px; height: 100px; border-style:solid; margin:auto; } #footerimage{ margin: auto; width: 990px; height:100px; border-style:solid; border-width:1px; background-image:url(images/footerimage.jpg); }
 
  #2 (permalink)  
Old 02-14-2012, 04:46 PM
Contributing Member
Latest Blog:
None

 
Join Date: 05-03-11
Posts: 120
iTrader: 0 / 0%
Never mind, I figured it out, Thanks
 
Go Back   Webmaster Forum > Web Development > Coding Forum

Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to have a floating menu, like this: dudeman Coding Forum 5 10-21-2008 01:34 AM
Floating without float marc_gfx Coding Forum 6 09-22-2008 07:21 AM
Floating Table OhCaN Coding Forum 13 08-24-2007 12:42 PM
Help with floating... spl1nter Coding Forum 3 09-12-2004 10:07 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 02:08 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2014 Escalate Media




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.