php html css problem

Hello,
I am having a problem of bringing down my html table i don’t know what effecting that
Here is the problem


here is source
[php]<?php

$rid = $_GET[‘id’];
require(“template/template.php”);
require (‘steamauth/steamauth.php’);
require (‘function/functions.php’);
$main = new Main;
$con=mysqli_connect($main->host,$main->user,$main->pass,$main->db);
$query =“SELECT * FROM tstraffle WHERE rid=’”.$rid."’";
$result = mysqli_query($con,$query);
while($row = mysqli_fetch_array($result)){
showHeader("Raffle Info | TFTRG ","Raffle - ".$row[‘nameofraffle’]);

function getname($steamid){
    $steamname ='';
    $api_key = "4"; // Insert API Key here!

    $urla = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $api_key;
    $urlb = "&steamids=";
    $urlc = $urla . $urlb;
    $url = $urlc . $steamid;
    $ch = curl_init();
    curl_setopt( $ch, CURLOPT_URL, $url);
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
    $content = curl_exec($ch);
    curl_close($ch);
    $content = json_decode($content, true);
    $steamname = $content['response']['players'][0]['personaname'];
    return $steamname;
}


?>
<style>
    .side{
        height: 10px;
        width: 600px;
        margin-left:auto;
        margin-right:auto;

    }
    .boxed {
        border: 1px solid green ;
        width: 120px;
        float: left;
        height: 120px;

    }
    .q0
    {
        background-color: #B2B2B2; // Normal
    }
    .q1{
        background-color:#FFD700; // unique
    }
    .q2
    {
        background-color: #476291; // vintage
    }
    .q3
    {
        background-color: #4D7455;// genuine
    }
    .q4
    {
        background-color: #CF6A32; // strange
    }
    .q5
    {
        background-color: #8650AC; // unususal
    }
    .q6
    {
        background-color: #38F3AB; // haunted
    }
    .q7
    {
        background-color:#AA0000; // collector's
    }
    .q8
    {
        background-color: #70B04A; // selfmade or community

    }
    .q9
    {
        background-color: #A50F79; // valve rocket launcher
    }
   
</style>
<? $text = $main->curl("http://api.steampowered.com/IEconItems_440/GetSchema/v0001/?key=". $main->steamkey . "&language=en"); $json = json_decode($text, true); if(isset($json['result']['items'])) { foreach($json['result']['items'] as $item) { switch($row['totitem']){ case 1: if($item['defindex'] == $row['item1']) { echo'
'; echo"
"; echo "
"; echo '
'; } break; case 2: if($item['defindex'] == $row['item1']) { echo'
'; echo"
"; echo "
"; } if($item['defindex'] == $row['item2']) { echo "
"; echo "
"; echo'
'; } break; case 3: if($item['defindex'] == $row['item1']) { echo'
'; echo"
"; echo "
"; } if($item['defindex'] == $row['item2']) { echo "
"; echo "
"; } if($item['defindex'] == $row['item3']) { echo "
"; echo "
"; echo '
'; } break; case 4: if($item['defindex'] == $row['item1']) { echo'
'; echo"
"; echo "
"; } if($item['defindex'] == $row['item2']) { echo"
"; echo "
"; } if($item['defindex'] == $row['item3']) { echo"
"; echo "
"; } if($item['defindex'] == $row['item4']) { echo "
"; echo "
"; echo'
'; } break; case 5: if($item['defindex'] == $row['item1']) { echo'
'; echo"
"; echo "
"; } if($item['defindex'] == $row['item2']) { echo "
"; echo "
"; } if($item['defindex'] == $row['item3']) { echo "
"; echo "
"; } if($item['defindex'] == $row['item4']) { echo "
"; echo "
"; } if($item['defindex'] == $row['item5']) { echo "
"; echo "
"; echo'
'; } break; default:echo 'Internal Error contact frost';break; } } } else { echo' steamapi down.'; exit; } echo '

'; echo "
Slots: 24 Admin: Frost Item Owner: Gamma032 Fees: 20c
"; showFooter(); ?>[/php]

I want the table to come on next line how to do that
Thanks.

You can do it a couple of different ways…

If you can push this out to the web and provide a link where I can access this page I can do it for you real quick.

But just glancing at you code you might be able to get away with

Adding this
[php]

[/php]

above

[php]switch($row[‘totitem’]){
[/php]

And change

[php]echo ‘

’;
echo “

Slots: 24 Admin: Frost Item Owner: Gamma032 Fees: 20c
”;[/php]

To

[php] echo “

Slots: 24 Admin: Frost Item Owner: Gamma032 Fees: 20c
”;[/php]

Before you start the table, you need to clear the float (

).

Another handy thing is to enable the dev tools, they might be enabled by default, as I don’t remember having to manually enabling them. Here’s all the shortcuts for that - https://developer.chrome.com/devtools/docs/shortcuts?hl=de-DE . If you go to inspect element, it’ll show you what’s going with the tags, the css and some other stuff. Very handy in this kind of situation.

Sponsor our Newsletter | Privacy Policy | Terms of Service