• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

CSS-Menü bis zum Seitenende

CyberBoy96

New member
Liebe Forummitglieder,

ich sitze nun schon mehr als zwei Stunden vor folgendem Problem: Ich habe ein CSS-Menü erstellt mit diesem Code:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css"> 
#menu {
        background: #333;
        float: left;
        list-style: none;
        margin-left: -208px;
        margin-top: -8px;
        padding: 0;
        width: 200px;
}
#menu li {
        font: 67.5% "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unicode MS", "Lucida Grande", Verdana, Helvetica, sans-serif;
        margin: 0;
        padding: 0;
}
#menu a {
        background: #333;
        border-bottom: 1px solid #393939;
        color: #ccc;
        display: block;
        margin: 0;
        padding: 8px 12px;
        text-decoration: none;
}
#menu a:hover {
        background: #2580a2 url("images/hover.gif") left center no-repeat;
        color: #fff;
        padding-bottom: 8px;
        #menu a:active {
        background: #2580a2 url("images/hover.gif") left center no-repeat;
        color: #fff;
        padding-bottom: 8px;
        }
</style></head>
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000" style="margin-left: 200px">
<ul id="menu"><li><a href="Home.html" target="_self" title="Home">Home</a></li></ul></body>
</html>
Dies funktioniert auch einwandfrei. Doch jetzt habe ich unter dem Menü bis zum Seitenende einen 200 Pixel breiten Rand. Doch ich möchte diesen Rand mit der gleichen Farbe des Menüs füllen, denn das sieht besser aus.

Ich hoffe, jemand weiß einen guten Rat.

Danke schonmal im Voraus
MfG CyberBoy96
 
Falls ich dein Anliegen richtig verstanden habe:
Habe hier mal was geändert/ergänzt:
PHP:
html, body {
	height:100%;
	margin: 0;
	padding: 0;
}
#menu {
	background: #333;
	float: left;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 200px;
	height: 100%;
}

Dann frage ich mich, was das hier woll soll?
PHP:
<body text="#000000" bgcolor="#FFFFFF" link="#FF0000" alink="#FF0000" vlink="#FF0000" style="margin-left: 200px">

Jedenfalls hab ich mal die Styleangabe 'margin-left:200px' entfernt, damit mein CSS-Vorschlag passt. Und was da sonst noch drin steht, gehört auch ins CSS.
 
Zurück
Oben