mike12255 Posted October 1, 2009 Share Posted October 1, 2009 so on the this page you can see a list of 25 names with the word "test" under them. I want to make the words test appear to the right of the names i tried echoing divs after after the names but that didnt work, here is my code and css: php code: <?php include "global.php"; //top 25 scores function top(){ $sql = "SELECT * FROM skillsoverall ORDER BY xp DESC LIMIT 0,25"; $i =1; $mods = array("samm", "claws", "danny", "josh", "tehbyte", "saints skill", "mike"); $res = mysql_query($sql) or die (mysql_error()); while ($row=mysql_fetch_array($res)){ echo "<div id=\"center\">"; if (in_array($row['playerName'],$mods)){ echo $i.". " ; //echo "<div style=\"color:#008B8B\">"; echo "<img src=\"modcrown.gif\">"; echo $row['playerName'] . "<br />"; //echo "</div>"; $i++; }else{ echo $i.". " . $row['playerName'] . "<br />"; $i++; } echo "</div>"; echo "<div id=\"right\">"; echo "test"; echo "</div>"; } } top(); ?> and here is my css: @charset "utf-8"; @import url(nav.css); /* CSS Document */ /* Blanket Styles*/ body { background:url(images/BG.gif); margin: 0; padding: 0; font-size: small; color: #383838; font-family: Verdana, Arial, Helvetica, sans-serif; } * html body { font-size: x-small; /* for IE5/Win */ f\ont-size: small; /* for other IE versions */ } img { border-style: none; } * { margin: 0; padding: 0; } a:link, a:visited { color: #383838; text-decoration: underline; } #left { width: 140px; float: left; padding: 15px 10px; /* side padding is added to total width above for a 160px "real total" */ } #center { margin: 0px; padding: 15px 8px 8px 8px; float: right; width: 144px; } #right { margin: 0 165px; padding: 15px; } #header{ width:750px; height:300px; margin-left:auto; margin-right:auto; margin-top:5px; background-image:url(images/header.png) } a:hover, a:active { color: #585858; } /* Conatiner */ #container { background-color: #fff; width: 1100px; margin: 0 auto; overflow: hidden; } /* Header */ #container h1 { width: 600px; height: 42px; margin: 28px 0 0 18px; float: left; font-family :Ligurino, Verdana, "Arial Rounded MT Bold", Arial, Georgia, "Times New Roman", Times, serif; font-size:36px;` } #staff{ background-color: #EBEBEB; margin-left:auto; margin-left:auto; text-align:left; } #skills{ float:right; width:auto; } #level{ float:left; width:auto; } #buttons { margin: 42px 27px 0; float: right; } #buttons img { padding-left: 7px; } /* Info */ #info { height: 315px; margin: 0 auto; clear: both; } #info h2 { font: 100 140% Arial, Helvetica, sans-serif; letter-spacing: 1.5px; color: #464646; padding: 22px 0 0 25px; } #info p { width: 220px; color: #898888; padding: 5px 0 0 25px; } #whatisthis { float: left; width: 300px; } #templatetypes { float:left; width: 200px; padding: 21px 0 0 66px; } #supportlinks { float: right; width: 155px; padding: 21px 50px 0; } #info ul { list-style-image: url(images/bullet.gif); } #info li { line-height: 22px; } #info a:link, #info a:visited { color: #585858; text-decoration: none; } #info a:hover, #info a:active { color: #585858; background-color: #FFFFFF; } /* Main Content Area */ #content_main { width: 620px; padding: 0 0 0 15px; margin: 20px 0; float: left; text-align: justify; margin-left: 15px; } #content_main p { line-height: 23px; display: block; text-align: left; padding-bottom: 10px; } #nav_main { float: right; width: 200px; background: url(images/r_bg.gif) repeat-y; height: 650px; padding: 0 0px 0 25px; margin: 32px 0; } #nav_main ul { list-style: none; } #nav_main ul li { line-height: 23px; } #nav_main a:link, #nav_main a:visited { color: #383838; text-decoration: none; } #nav_main a:hover, #info a:active { color: #585858; } #card { float: left; } h3 { font-family: "Times New Roman", Times, serif; font-size: 180%; font-weight: 100; } h4 { color: #bbbbbb; font-family: "Times New Roman", Times, serif; font-weight: 100; padding-bottom: 8px; } hr { border: 0; color: #d7d5cb; background: #d7d5cb; height: 1px; margin: 15px 0 20px 0; } /* Footer */ #footer { width: 822px; color: #fff; font-size: 85%; margin: 20px auto; padding-bottom: 20px; } #footer a:link, #footer a:hover, #footer a:active, #footer a:visited { color: #fff; text-decoration: none; } #copyright { float: left; } #nav_footer { float: right; list-style: none; } #nav_footer li { float: left; } /* Special Formatting */ code { margin: 5px 0; padding: 10px; text-align: left; display: block; overflow: auto; font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace; /* white-space: pre; */ background: #FAFAFA; border: 1px solid #f2f2f2; border-left: 3px solid #666666; } blockquote { margin: 15px; padding: 0 0 0 20px; background-color: #FAFAFA; background-position: 8px 10px; border: 1px solid #f2f2f2; border-left: 3px solid #666666; font: bold 1.2em/1.5em "Trebuchet MS", Tahoma, sans-serif; color: #666666; } blockquote p, blockquote ul, blockquote ol { line-height: normal; font-style: italic; } .float-left { float: left; padding-right: 5px; } .float-right { float: right; padding-left: 5px; } .align-left { text-align: left; } .align-right { text-align: right; } /* Table Styling */ table { border-collapse: collapse; margin: 10px 15px; } th strong { color: #fff; } th { background: #717170; background-image:url(images/nav/nav_bg.png); background-repeat:repeat-x; height: 35px; padding-left: 11px; padding-right: 11px; color: #fff; text-align: left; border-left: 1px solid #999999; border-bottom: solid 2px #FFF; } tr { height: 30px; } td { padding-left: 11px; padding-right: 11px; /* border-left: 1px solid #FFE1C3; */ border-left: 1px solid #FFF; border-bottom: solid 1px #ffffff; } td.first,th.first { border-left: 0px; } tr.row-a { background: #F8F8F8; } tr.row-b { background: #EFEFEF; } /* form styling */ form { margin:10px 15px; padding: 5px; border: 1px solid #EEEEEE; background-color: #FAFAFA; } label { display:block; font-weight:bold; margin:5px 0; } input { width: 275px; padding: 2px; border:1px solid #eee; font: normal 1em "Trebuchet MS", Tahoma, sans-serif; color:#777; } textarea { width:375px; padding:2px; font: normal 1em "Trebuchet MS", Tahoma, sans-serif; border:1px solid #eee; height:100px; display:block; color:#777; } input.button { margin: 0; font: bold 1em Arial, Sans-serif; background: #FFF url(gradientbg.jpg) repeat-x; padding: 2px 3px; color: #333; border: 1px solid #DADADA; } Quote Link to comment https://forums.phpfreaks.com/topic/176221-when-to-echo-divs/ Share on other sites More sharing options...
mikesta707 Posted October 1, 2009 Share Posted October 1, 2009 #right { margin: 0 165px; padding: 15px; float:right; } try that. Quote Link to comment https://forums.phpfreaks.com/topic/176221-when-to-echo-divs/#findComment-928700 Share on other sites More sharing options...
mike12255 Posted October 1, 2009 Author Share Posted October 1, 2009 no didnt help, thanks for trying though mate Quote Link to comment https://forums.phpfreaks.com/topic/176221-when-to-echo-divs/#findComment-928702 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.