• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Problem mit CSS Aufbau

MonsterUser

Neues Mitglied
Hallo zusammen ich hab ein Problem mit meinen CSS


Meine index.html Datei
HTML:
<html>
<head>
<title>CSS Problemseite</title>
</head>
<body>
<link href="styles.css" rel="stylesheet" type="text/css">
<div id="page">
</div>
</body>
</html>
Meine styles.css Datei
Code:
body   {background-color:#000000;}
/*
#page  {position:relative; margin-top:20px; margin-left:auto; margin-right:auto; width:996px; min-height:580px;}
*/
#page {
position:relative;
 margin-top:20px;
 margin-left:auto;
 margin-right:auto;
 width:996px;
 min-height:580px;
 background-color: #FFFF00;}
Wie bekomm ich nun noch so ein grünes feld wie
auf dem Bild mit CSS in die Seite ?
Wie.gif

Edit: habe "background-color: #cccccc;" aus CSS code entfernt weil unötig.
 
Zuletzt bearbeitet:
Zunächst mal musst du das innerhalb des head-Bereichs einfügen (ist bei deinem Code an der falschen Stelle):
Code:
<link href="styles.css" rel="stylesheet" type="text/css">

Relative Positionierungen brauchst du nicht.

Versuch's vom Prinzip her mal so:

Code:
#wrapper {
width: 1200px;
margin: 0 auto;
background: #000;
}

#left {
float: left;
margin-top: 20px;
width: 185px;
background: #99ff33;
}

#page {
 margin-top:20px;
margin-left: 200px;
 width:1000px;
 min-height:580px;
 background-color: #FFFF00;
}

.clear {
clear: both;
}

Code:
<div id="wrapper">
<div id="left">Linksbox</div>
<div id ="page">Page</div>
<div class="clear"><!--Clear-Div--></div>
</div><!--Ende #wrapper-->
 
Zurück
Oben