• 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!

How do i move this to the center?

Tyson12302

New Member
Joined
Aug 6, 2014
Messages
264
Reaction score
4
Is there a way to put this "Online players" to the center? (FIXED)

Also how do i change the background/header in this layout? This code gets rid of it
PHP:
<div id="logo"></div>
But when i add another image i put the name ID in the code but it doesn't do any thing.
 
Last edited:
Would be good if you posted the full code insted.
Depending on HTML tag, either:
Code:
style="align: center;"

Or
Code:
<p>align="center">text</p>
 
Would be good if you posted the full code insted.
PHP:
<div class="sidebar">
    <div class="inner2">
            <?php
            $status = true;
            if ($config['status']['status_check']) {
                @$sock = fsockopen ($config['status']['status_ip'], $config['status']['status_port'], $errno, $errstr, 1);
                if(!$sock) {
                    echo '<center><img src="layout/images/status/offline.png"></center>';
                    $status = false;
                }
                else {
                    $info = chr(6).chr(0).chr(255).chr(255).'info';
                    fwrite($sock, $info);
                    $data='';
                    while (!feof($sock))$data .= fgets($sock, 1024);
                    fclose($sock);
                    echo '<center><img src="layout/images/status/online.png"></center>';

                }
            }
            if ($status) {
                ?>
                <li><a href="onlinelist.php">Players online: 
                <?php echo user_count_online(); ?></a></li>
                <?php
            }
            ?>
        </ul>
    </div>
</div>
 
Code:
                ?>
                <li><a href="onlinelist.php">Players online: 
                <?php echo user_count_online(); ?></a></li>
                <?php

Code:
                ?>
                <center><li><a href="onlinelist.php">Players online: 
                <?php echo user_count_online(); ?></a></li></center>
                <?php
 
Once again hard to say without the full code, but your css file? Or it might be added in your html/php file aswell.
 
Heres the full code
PHP:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title><?php echo $config['site_title']; ?></title>
    <link rel="stylesheet" href="layout/css/default.css" type="text/css" />
    <link rel="stylesheet" href="layout/css/basic.css" type="text/css" />
   
    <link rel="icon" href="layout/images/favicon.ico" type="image/x-icon">

    <script type="text/javascript" src="layout/js/slideshow.js"></script>
    <script type="text/javascript" src="layout/js/jquery-1.4.2.min.js"></script>

    <script type="text/javascript" src="layout/js/initialize.js"></script>
    <script type='text/javascript'> var IMAGES=0; IMAGES='layout/images'; var g_FormField='';  var LINK_ACCOUNT=0; LINK_ACCOUNT='';</script>
</head>
<body>
<div id="page">
    <div id=""></div>
        <div id="content">
            <div id="menu_top">
                <div class='img'>
                    <div class="left">
                        <div id='menu_top_home'>
                            <a href="index.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/news_1a.png' alt='<?PHP echo $title; ?> :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/news_1b.png' alt='<?PHP echo $title; ?> :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                        <div id='menu_top_acc'>
                            <a href="myaccount.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/account_1a.png' alt='Account :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/account_1b.png' alt='Account :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                        <div id='menu_top_shop'>
                            <a href="shop.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/shop_1a.png' alt='Shop :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/shop_1b.png' alt='Shop :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                       
                    <div class="online">
                        <?php include 'layout/widgets/serverinfo.php'; ?>
                    </div>
                   
                    <div class="right">
                        <div id='menu_top_forum'>
                            <a href="forum.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/forum_1a.png' alt='Forum :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/forum_1b.png' alt='Forum :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                        <div id='menu_top_highscores'>
                            <a href="highscores.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/highscores_1a.png' alt='Highscores :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/highscores_1b.png' alt='Highscores :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                        <div id='menu_top_register'>
                            <a href="register.php">
                                <div class='fadehover'>
                                    <img src='layout/images/menu/register_1a.png' alt='Register :: Open Tibia Server' class='a' />
                                    <img src='layout/images/menu/register_1b.png' alt='Register :: Open Tibia Server' class='b' />
                                </div>
                            </a>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
           
            <div id="menu_left">
                <?php include 'layout/menu.php'; ?>
            </div>
           
            <div id="content_text">
 
Code:
#logo {
    background: url('../images/background/logo.png') no-repeat;
    height: 184px;
    width: 741px;
    margin: 30px auto;
}

#content {
    background:url('../images/content/content.jpg') repeat-y;
    margin:auto;
    width:968px;
    margin-top: 70px;
    margin-left: 62px;
    position: absolute center;
    float: left;
}

#content_bot {
    background: url('../images/content/content_bot.png') no-repeat;
    height: 74px;
    width:968px;
    margin:auto;
    float: left;
    margin-left: 62px;
}

#footer {
    height: 15px;
    width:968px;
    float: left;
    margin-left: 62px;
}
All this is css but i dont get it.
 
Code:
#logo {
    background: url('../images/background/logo.png') no-repeat;
    height: 184px;
    width: 741px;
    margin: 30px auto;
}

That is the image url if that is what you are asking for, that is the only config I can see for it - you linked the wrong file.
Really hate when people write code like this, but I suppose it's this file?
<?php include 'layout/widgets/serverinfo.php'; ?>

Or this one:
<?php include 'layout/menu.php'; ?>
 
Back
Top