liamloveslearning Posted August 24, 2009 Share Posted August 24, 2009 Hi everybody, Ive never actually got my head around this no matter how hard ive googled and youtube'd, what i have is a header div, container div (which contains right and left content divs) and then a footer. My content div is set to auto height and so is my left content div, when I fill my left content div with text however it gains height but my content div doesnt and my footer div doesnt move down the page respectively, heres my code, if anybody has any idea it would be greatly appreciated, thanks index <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Picture This - Makeover Photography Studio</title> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="css/text.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- --> </style> </head> <body> <div id="container"> <div id="header"> <div id="faq"></div> </div> <div id="content"></div> <div id="contentleft">sadas<br /> sadas<br />sadas<br />sadas<br />sadas<br />sadas<br />sadas<br />sadas<br /></div> <div id="contentright">sfsdf</div> <div id="footer">asdasd</div> </div> </div> </body> </html> style @charset "UTF-8"; /* CSS Document */ #container { width: 1020px; margin-right: auto; margin-left: auto; height: 600px; position: relative; background-color: #FFF; background-image: url(../images/grid.jpg); } #content { position: relative; } #header { height:380px; width:1020px; background-color: #F00; } #logo { height: 25px; width: 140px; margin-left: 40px; margin-top: 25px; float: left; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } #faq { width: 100%; height: 25px; margin-right: auto; margin-left: auto; } #nav { width: 940px; position: relative; margin-right: auto; margin-left: auto; } #contentleft { background-color: #930; width: 780px; float: left; margin-left: 40px; margin-top: -64px; position: absolute; } #contentright { float: right; width: 140px; margin-right: 40px; } #footer { background-color: #633; width: 940px; margin-left: 40px; clear:both; } Quote Link to comment https://forums.phpfreaks.com/topic/171666-solved-cant-get-div-to-position-properly/ Share on other sites More sharing options...
liamloveslearning Posted August 24, 2009 Author Share Posted August 24, 2009 nevermind sussed it! i had my content left position absolutely, thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/171666-solved-cant-get-div-to-position-properly/#findComment-905210 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.