• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved [php] help getting boxes separated from each other

johnsamir

Advanced OT User
Joined
Oct 13, 2009
Messages
1,094
Solutions
6
Reaction score
192
Location
Nowhere
Hello i have been modifying the website that im using to make it look better
the problem that im facing is that now that i have edited it two boxers seems to be pretty near from each other and i can't get them appart can you lend me a hand with this? i've been struggling almost all day
Untitled.png
it looks like this as you can see the box which says latest kills looks independant from other boxes meanwhile the boxes from above looks like gloued or pretty near from each other can you help me please? thanks in advance

this is how the code looks
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
if ($config['ServerEngine'] == 'TFS_02' || $config['ServerEngine'] == 'TFS_10' || $config['ServerEngine'] == 'OTHIRE') {
$cache = new Cache('engine/cache/killers');
if ($cache->hasExpired()) {
    $killers = fetchMurders();

    $cache->setContent($killers);
    $cache->save();
} else {
    $killers = $cache->load();
}
$cache = new Cache('engine/cache/victims');
if ($cache->hasExpired()) {
    $victims = fetchLoosers();

    $cache->setContent($victims);
    $cache->save();
} else {
    $victims = $cache->load();
}
$cache = new Cache('engine/cache/lastkillers');
if ($cache->hasExpired()) {
    $latests = mysql_select_multi("SELECT `p`.`name` AS `victim`, `d`.`killed_by` as `killed_by`, `d`.`time` as `time` FROM `player_deaths` as `d` INNER JOIN `players` as `p` ON d.player_id = p.id WHERE d.`is_player`='1' ORDER BY `time` DESC LIMIT 20;");
    if ($latests !== false) {
        $cache->setContent($latests);
        $cache->save();
    }
} else {
    $latests = $cache->load();
}
if ($killers) {
?>
 <div class="TableContainer">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
                <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <div class="Text">Biggest Murders</div>
                <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            </div>
        <!-- </div> -->
<!-- <h1>Biggest Murders</h1> -->
  <table class="Table3" cellspacing="2">
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <div class="TableShadowContainerRightTop">
                                        <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                    </div>
                                    <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                        <div class="TableContentContainer">
                                            <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                                <tr>
<table id="killersTable" class="table table-striped">
    <tr class="yellow">
        <th>Name</th>
        <th>Kills</th>
    </tr>
    <?php foreach ($killers as $killer) {
        echo '<tr>';
        echo "<td width='70%'><a href='characterprofile.php?name=". $killer['killed_by'] ."'>". $killer['killed_by'] ."</a></td>";
        echo "<td width='30%'>". $killer['kills'] ."</td>";
        echo '</tr>';
    } ?>
</table>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="TableShadowContainer">
                                        <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                            <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                            <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>

<?php
} else echo 'No player kills exist.';

if ($victims) {
?>
 <div class="TableContainer">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
                <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <div class="Text">Biggest Victims</div>
                <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            </div>
        <!-- </div> -->
<!-- <h1>Biggest Victims</h1> -->
<table class="Table3" cellspacing="2">
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <div class="TableShadowContainerRightTop">
                                        <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                    </div>
                                    <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                        <div class="TableContentContainer">
                                            <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                                <tr>
<table id="victimsTable" class="table table-striped">
    <tr class="yellow">
        <th>Name</th>
        <th>Deaths</th>
    </tr>
    <?php foreach ($victims as $victim) {
        echo '<tr>';
        echo "<td width='70%'><a href='characterprofile.php?name=". $victim['name'] ."'>". $victim['name'] ."</a></td>";
        echo "<td width='30%'>". $victim['Deaths'] ."</td>";
        echo '</tr>';
    } ?>
</table>
</table>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="TableShadowContainer">
                                        <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                            <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                            <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
      <!-- TERMINO -->
<?php
} else {
    echo 'No player kills exist.';
}

if ($latests) {
?>
    <div class="TableContainer">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
                <span class="CaptionEdgeLeftTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightTop" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionBorderTop" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionVerticalLeft" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <div class="Text">Latest kills</div>
                <span class="CaptionVerticalRight" style="background-image:url(layout/tibia_img/box-frame-vertical.gif);"></span>
                <span class="CaptionBorderBottom" style="background-image:url(layout/tibia_img/table-headline-border.gif);"></span>
                <span class="CaptionEdgeLeftBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
                <span class="CaptionEdgeRightBottom" style="background-image:url(layout/tibia_img/box-frame-edge.gif);"></span>
            </div>
        </div>
        <table class="Table3" cellspacing="2">
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table style="width:100%;">
                            <tr>
                                <td>
                                    <div class="TableShadowContainerRightTop">
                                        <div class="TableShadowRightTop" style="background-image:url(layout/tibia_img/table-shadow-rt.gif);"></div>
                                    </div>
                                    <div class="TableContentAndRightShadow" style="background-image:url(layout/tibia_img/table-shadow-rm.gif);">
                                        <div class="TableContentContainer">
                                            <table class="TableContent" width="100%" style="border:1px solid #faf0d7;">
                                                <tr>
                                                    <table id="killersTable" class="table table-striped">
                                                        <tr class="yellow">
                                                            <th>Killer</th>
                                                            <th>Time</th>
                                                            <th>Victim</th>
                                                        </tr>
                                                        <?php foreach ($latests as $last) { ?>
                                                            <tr>
                                                                <td width='35%'><a href='characterprofile.php?name=<?= $last['killed_by'] ?>'><?= $last['killed_by'] ?></a></td>
                                                                <td width='30%'><?= getClock($last['time'], true) ?></td>
                                                                <td width='35%'><a href='characterprofile.php?name=<?= $last['victim'] ?>'><?= $last['victim'] ?></a></td>
                                                            </tr>
                                                        <?php } ?>
                                                    </table>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="TableShadowContainer">
                                        <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                            <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                            <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
<?php
} else {
    echo 'No player kills exist.';
}

} else if ($config['ServerEngine'] == 'TFS_03') {
    $cache = new Cache('engine/cache/killers');
    if ($cache->hasExpired()) {
        $deaths = fetchLatestDeaths_03(30, true);
        $cache->setContent($deaths);
        $cache->save();
    } else {
        $deaths = $cache->load();
    }

    if ($deaths && !empty($deaths)) {
?>
        <h1>Latest Killers</h1>
        <table id="deathsTable" class="table table-striped">
            <tr class="yellow">
                <th>Killer</th>
                <th>Time</th>
                <th>Victim</th>
            </tr>
            <?php foreach ($deaths as $death) { ?>
                <tr>
                    <td><a href='characterprofile.php?name=<?= $death['killed_by'] ?>'><?= $death['killed_by'] ?></a></td>
                    <td><?= getClock($death['time'], true) ?></td>
                    <td>At level <?= $death['level'] ?>: <a href='characterprofile.php?name=<?= $death['victim'] ?>'><?= $death['victim'] ?></a></td>
                </tr>
            <?php } ?>
        </table>
<?php
    } else {
        echo 'No player deaths exist.';
    }
}
include 'layout/overall/footer.php';
?>
edit: solved change to this in the bottom of the first box / table
Lua:
    } ?>
</table>
</table>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="TableShadowContainer">
                                        <div class="TableBottomShadow" style="background-image:url(layout/tibia_img/table-shadow-bm.gif);">
                                            <div class="TableBottomLeftShadow" style="background-image:url(layout/tibia_img/table-shadow-bl.gif);"></div>
                                            <div class="TableBottomRightShadow" style="background-image:url(layout/tibia_img/table-shadow-br.gif);"></div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
      <!-- TERMINO -->
 
Last edited:
In the middle of Killer and Victim. I can see "Time" table. What happens if you minimize the text "12 January 2023 (02.30)" ? I haven't been doing this for a long time. But if you want the height to be like on the others, then I would try to minimize the text first or make the boxes a little bit bigger just to see if it gets glued as you wanted. Another alternative is to set MAX-HEIGHT in CSS.

I am also sure there is a CSS FILE that control those boxes.
 
Back
Top