Noskiw Posted June 21, 2009 Share Posted June 21, 2009 this is my css script div#container { margin-left: 50px; margin-right: 50px; margin-top: 50px; } div#header { margin-right: 0px; background-color: #CCC; } div#header p { padding: 0px; text-align: right; padding-right: 5px; } div#header p a { color: #a00000; text-decoration: none; } div#header p a:hover { color: #000; text-decoration: underline; } div#nav { text-align: left; width: 200px; background-color: #CCC; margin-top: 15px; padding:0px; } div#nav a { color: #a00000; text-decoration: none; } div#nav a:hover { color: #000000; text-decoration: underline; } div#nav h3 { padding-top: 0px; margin-top: 0px; padding-bottom: 3px; margin-bottom: 3px; } #content { margin-left: 210px; margin-right: 0px; background-color: #CCC; padding:0px; } a { color: #a00000; text-decoration: none; } a:hover { color: #000; text-decoration: underline; } and this is my page code <?php include'./global.php'; session_start(); ?> <html> <head> <title>My Blog</title> <link rel="stylesheet" href="./style.css" type="text/css"> </head> <body> <div id="container"> <div id="header"> <center><h1>My Blog</h1></center> <?php if($_SESSION['uid']){ echo "<p>You're logged in!</p>\n"; }else{ echo "<p>Welcome, <b>Guest</b> | <a href=\"./reg.php\">Register</a> | <a href=\"./login.php\">Login</a></p>\n"; } ?> </div> <div id="nav"> <a href="./index.php">Home</a><br> <h3>Categories</h3> <a href="">HTML</a><br> <a href="">CSS</a><br> <a href="">PHP</a><br> </div> <div id="content" valign="top"> </div> </div> </body> </html> could anyone help me with this problem? Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/ Share on other sites More sharing options...
jmr3460 Posted June 21, 2009 Share Posted June 21, 2009 What exactly is happening? Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860681 Share on other sites More sharing options...
Noskiw Posted June 21, 2009 Author Share Posted June 21, 2009 the div at the bottom needs to be right next to the left hand div, not underneath it. Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860687 Share on other sites More sharing options...
Ken2k7 Posted June 21, 2009 Share Posted June 21, 2009 Float the nav to the left and the contents to the right. Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860690 Share on other sites More sharing options...
Noskiw Posted June 21, 2009 Author Share Posted June 21, 2009 ok, now the content is a little bit above the navigation. Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860691 Share on other sites More sharing options...
DarkSuperHero Posted June 21, 2009 Share Posted June 21, 2009 div#container { margin-left: 50px; margin-right: 50px; margin-top: 50px; } div#header { margin-right: 0px; background-color: #CCC; } div#header p { padding: 0px; text-align: right; padding-right: 5px; } div#header p a { color: #a00000; text-decoration: none; } div#header p a:hover { color: #000; text-decoration: underline; } #content { float:right; width:82%; paddin-left:15px; margin-top: 15px; min-width:600px; background-color: #CCC; padding:0px; } div#nav { float:left; text-align: left; width: 15%; min-width:200px; background-color: #CCC; margin-top: 15px; padding:0px; } div#nav a { color: #a00000; text-decoration: none; } div#nav a:hover { color: #000000; text-decoration: underline; } div#nav h3 { padding-top: 0px; margin-top: 0px; padding-bottom: 3px; margin-bottom: 3px; } a { color: #a00000; text-decoration: none; } a:hover { color: #000; text-decoration: underline; } try that out, although it might not be exctly what your looking for....i would suggest looking into positioning things absolutly....and the page it too wide on my screen.... 1600pixels wide...so i would prolly not stay on your page too long if it was a done site... Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860776 Share on other sites More sharing options...
Noskiw Posted June 21, 2009 Author Share Posted June 21, 2009 perfect, thankyou. Link to comment https://forums.phpfreaks.com/topic/163125-why-does-this-keep-happening/#findComment-860788 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.