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

Div an Browserhöhe anpassen

Fabiii321

Mitglied
Hallo,

jetzt habe ich doch noch eine Frage.

Habe jetzt schon lange im Internet gesurft aber finde nichts.

Ich will den div Container Content an die Browserhöhe anpassen.

Wie mache ich das??

Code:
/* CSS Document */

html {
height:100%;
margin:0;
padding:0;
}
body{
background-color: #DED6D6;
margin: 0;
padding: 0;
height: 100%;
}

#website{
height:100%;
width:100%;
}

#main_login{
margin-left:auto;
margin-right:auto;
margin-top:3em;
background-color:grey;
width:400px;
text-align:center;
border-bottom-right-radius: 50px;
border-bottom-left-radius: 50px;
border-top-left-radius: 50px;
border-top-right-radius: 50px;
}

#header{
height:50px;
background-color:green;
text-align:center;
margin-top: 0px;
font-size:40px;
}

#navi{
float:left;
width:200px;
height:10%;
background-color:blue;
}

#content{
height:100%;
overflow: scroll;
background-color:red;
text-align:left;
}

HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<html>
  <head>
  <link href="style.css" rel="stylesheet" type="text/css" />
  <title></title>
  </head>
 
  <body>
 
    <div id="website">

      <div id="header">
        header
      </div>
     
      <div id="navi">
        test<br>
        test1<br>
        test2
      </div>
     
      <div id="content">
         
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
          Inhalt blablablbalblbjklsdhbihsfiohsoifhsoifshfioushnjsbdgjkhdjkghdjhdxhgdikjcgioudhf<br>
          dfghdjghdfsjfhkjghskgjhsdfjkghsdfjk<br>
          jfdghdjfhfioghdiogdfgoj<br>
          dhfguidshgdiughsduifghsdifugh<br>
        
        </div>
       
        </div>
        </body>
</html>


Vielen, vielen Dank
Gruß
Fabi
 

Anhänge

  • Unbenannt.png
    Unbenannt.png
    46 KB · Aufrufe: 0
Zurück
Oben