Div login and out. style chenge

Link this is going wrong key is admin admin.

[edit]broken link removed
Mittineague[/edit]

why is post on top when logged out.=?

index.php code

<?php
session_start();
require_once 'config.php';
require_once 'dbconn.php';
if ($_POST['submit'] == 'slet' && (isset($_POST['id']) && !empty($_POST['id']))) {
    $id = $_POST['id'];
    $query = "DELETE FROM cmsnetavisen_post WHERE id='$id'";
    $result = $objConnection->query($query);
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="css/styles.css">
        <script src="js/less.min.js"></script>
        <title>Netavisen.dk</title>
    </head>
    <body>
        <div id="wrapper">
            <div class="header"><h1>NetAvisen.dk</h1><div class="logobund">Global News</div></div>
            <div class="nav">
                <ul>
                    <li><a href="../cmsnetavisen/index.php">Forside</a></li>
                    <li><a href="../cmsnetavisen/indland.php">Indland</a>
                        <ul>
                            <li><a class="menubg" href="../cmsnetavisen/indland_politik.php">Politik</a></li>
                            <li><a class="menubg" href="../cmsnetavisen/indland_finans.php">Finans</a></li>
                        </ul>
                    </li>
                    <li><a href="../cmsnetavisen/udland.php">Udland</a>
                        <ul>
                            <li><a class="menubg" href="../cmsnetavisen/udland_politik.php">Politik</a></li>
                            <li><a class="menubg" href="../cmsnetavisen/udland_okonomi.php">Økonomi</a></li>
                        </ul>
                    </li>
                    <li><a href="../cmsnetavisen/sport.php">Sport</a>
                        <ul>
                            <li><a class="menubg" href="../cmsnetavisen/sport_fodbold.php">Fodbold</a></li>
                            <li><a class="menubg" href="../cmsnetavisen/sport_tennis.php">Tennis</a></li>
                            <li><a class="menubg" href="../cmsnetavisen/sport_handbold.php">Håndbold</a>
                            <ul>
                                <li><a class="menubg" href="../cmsnetavisen/sport_handbold_herreliga.php">Herreliga</a></li>
                                <li><a class="menubg" href="../cmsnetavisen/sport_handbold_dameliga.php">Dameliga</a></li>
                            </ul></li>
                        </ul>
                    </li>
                    <li><a href="../cmsnetavisen/bolig.php">Bolig</a></li>
                    <li><a href="../cmsnetavisen/minside.php">Min side</a></li>
                    <li><a href="../cmsnetavisen/blivbruger.php">Bliv bruger</a></li>
                </ul>
                <div class="login">
                    <?php
                    if (isset($_SESSION['brugernavn'])) {
                        ?>
                        <form action="logud.php" method="post">
                            <input type="submit" value="Log ud" class="submit">              
                        </form>
                        <?php
                    } else {
                        ?>
                        <form action="brugerlogin.php" id="login" method="post">
                            <label>BrugerNavn:&nbsp;</label>
                            <input type="text" name="brugernavn" id="brugernavn" placeholder="Brugernavn"  size="15">
                            <label>&nbsp;Password:&nbsp;</label>
                            <input type="password" name="kodeord" id="password" placeholder="Kodeord"  size="15">
                            <input type="submit" value="Log ind" class="submit">               
                        </form>
                        <?php
                    }
                    ?>
                </div>
            </div>
                <div class="side">
                <div class="box">
                        
                    <a href="../cmsnetavisen/minside.php"></a>
                    <h2>Nye Nyheder</h2>
                    <?php
                    $sql = "SELECT id, kategori, name, beskrivelse, billed, poster FROM cmsnetavisen_post";
                    $result = $objConnection->query($sql);
                    while ($row = $result->fetch_object()) {?>
                    
                    <div class="auction">
                        <?php
                        echo '<div class="kasser">';
                        echo '<p><b>' . $row->name . '</b></p>';
                        echo $row->kategori;
                        echo '<br><br>';
                        echo $row->beskrivelse;
                        echo '<br><br>';
                        echo '<br><br>';
                        if ($_SESSION['uid'] == $row->poster || $_SESSION['admin']) {
                        
                        
                        echo "<img style='float:right;' src='images/" . $row->billed . "' alt=''>";
                        
                            ?>
                            <form action="" method="post">
                                <input type="submit" name="submit" value="slet">
                                <input type="hidden" name="id" value="<?= $row->id ?>">
                            </form>
                            <?php
                            echo '</div>';
                            echo '</div>';
                        }
                        
                    }
                    ?>
                </div>
            </div>
        </div>
        <div class="footer"><div id="footershadow"></div><br>
            <div class="copyright"><br><br><br><br><br><br><br>
                <label>Copyright Netavisen.dk 2014</label></div>
        </div>
    </body>
</html>

link http://hans.wi7.sde.dk/cmsnetavisen/index.php

oh and some might be in Danish. Parten my english :stuck_out_tongue:

Hi, hpultralow. Welcome to the forums.

According to Firebug and the HTML validator, the content divs on the index page are not closed. In effect, they are all nested within each other. As a result, they overflow the right side of the page instead of flowing down the page as separate posts.

There are a number of different errors on the minside.php page.

It’s always good practice to check your code occasionally in the HTML and CSS validators as you code your pages.

http://jigsaw.w3.org/css-validator/

Hope this helps.