html - i can't figure out why this css is not working -
thirtydot edit: (there's no doctype)
here code in pastebin: http://pastebin.com/zwptd8dd
<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>my layout</title> <style type="text/css"> #wholepage{ background: #fff; width: 960px; margin: 0 auto; } #header{ width: 960px; margin: auto 0; } #header ul{ border:1px solid #bbbbbb; width:100%; height:45px; -moz-border-radius:8px; -webkit-border-radius: 4px; list-style: none; } #header ul li{ float: left; margin: 3px; } #login-form{ position: relative; margin-left: 750px; margin-right: -20px; border: 1px solid #4e4e4e; } #frontpage-content{ position: relative; margin-right: 210px; border: 1px solid #bbbbbb; } </style> </head> <body> <div id="wholepage"> <div id="header"> <ul> <li>home</li> <li>profile</li> <li>username <input type="text"/> </li> <li>password <input type="password" /> </li> <li><input type="submit" value="login"/> </ul> </div> <div id="login-form"> widget 1 : description of widget 1 here ... </div> <div id="login-form"> widget 2 : description of widget 2 here... </div> <div id="frontpage-content"> content here<br/> content here<br/> </div> <p>terms of use | contact | | developers | advertising | services | partners</p> </div> </body> </html>
it's pushing down "frontpage-content" div. i've been trying fix long time. have no more ideas. :(
this problem solved. thank guys helping.
i'm assuming judging how you've got margins set want frontpage-content to right of login-form widgets?
if so, you're missing css value "float". i'd put sidebar content in div id "left-sidebar" , make it
#left-sidebar { width: 200px; float: left; } #frontpage-content{ position: relative; width: 750px; float: right; border: 1px solid #bbbbbb; } #login-form{ position: relative; width: 100%; border: 1px solid #4e4e4e; }
and in source after #frontpage-content, place:
<div style="clear:both;"></div>
before footer stuff.
Comments
Post a Comment