aznjay Posted September 9, 2008 Share Posted September 9, 2008 Problem has occured... When I resize my window the black box always is not in position...I need help i've been looking around because i don't want it to overlap from my layout. Click here: http://alltraxx.uni.cc/test.html Quote Link to comment Share on other sites More sharing options...
aznjay Posted September 9, 2008 Author Share Posted September 9, 2008 <html> <head> <link rel="stylesheet" type="text/css" href="contrib.css" /> <title> AllTraxx </title> </head> <div> <body background="alltraxxlayout.jpg"> <div id="nav"> lsoldjlehmcikhekfjmd </div> </body> </html> the CSS part: body { font-family: Verdana, Arial, Times new roman; font-size: 11px; color: #color; background-position: top center; width:900; height:2000; background-repeat: repeat-y; } #nav { position:relative; top:1em; left: 259px; float:left; height:250; width:145; background-color:#000; } Quote Link to comment Share on other sites More sharing options...
aznjay Posted September 9, 2008 Author Share Posted September 9, 2008 bump bump bump!!!!! Quote Link to comment Share on other sites More sharing options...
obsidian Posted September 9, 2008 Share Posted September 9, 2008 You are having this issue because you are using relative (fixed) positioning. By definition, this causes your element to be placed where you define, and it will not change when the browser is resized. Also, there is no point in using both a fixed placement and a float. If you describe what you are wanting to achieve, I'm sure we can help you. Try something like this in the meantime: HTML <body> <div id="wrapper"> <div id="nav">asdfasdfasdf</div> </div> </body> CSS #wrapper { width: 900px; margin: 15px auto; } #nav { float: left; height: 250px; width: 145px; background-color: #efefef; } Quote Link to comment 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.