CSS Navigation horizontal mit linker und rechter Ausrichtung

Du solltest wirklich mal deinen Code posten. Bei mir funktioniert folgender Schnipsel auf alle Fälle wie erwartet und gewünscht

Code:
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
        .item {
            background-color: #922;
            border: 1px solid black;
            padding: 0px 5px 0px 5px;
            float: left;
        }
        .right {
            float: right;
        }
        #content {
            margin-top: 20px;
            clear: both;
            float: left;
            height: 500px;
            width: 70%;
            background-color: #777;
        }
        #ads {
            margin-top: 20px;
            float: right;
            height: 200px;
            width: 30%;
            background-color: #ccc;
        }
    </style>
</head>
<body>
<div id="nav">
    <div class="item">foo</div>
    <div class="item">foo</div>
    <div class="item right">bar</div>
    <div class="item right">bar</div>
</div>
<div id="content">blahblub</div>
<div id="ads">Hier könnte ihre Werbung stehen</div>
</body>
</html>
 
Zurück
Oben