Seite 1 von 1

Alle Browser ignorieren overflow:hiidden / overflow:auto

Verfasst: 01.07.2009, 11:53
von Andreas I.
Hilfe, ich habe folgendes CSS:

Code: Alles auswählen

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

#wrapper {
background-color: #FFFFFF;
width: 80%;
margin: auto; 
height:auto;
overflow: hidden 
}
Und dazu folgende html

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http&#58;//www.w3.org/1999/xhtml">
<head><title>Blubber</title>
<link rel="stylesheet" type="text/css" href="bla.css" />
</head>
<body>
<div id="wrapper">
<p>Blubber Blubber .... &#91;RECHT OFT WIEDERHOLT&#93; </p>
</div>
</body>
</html>
Wenn der Blubber-Inhalt groß genug ist, gibt es einen Scrollbalken. overfllow:hidden wird total ignoriert! Wo ist da der Fehler?

Verfasst:
von

Verfasst: 01.07.2009, 12:22
von xoni
Hallo Andreas,

das Problem dürfte daran liegen

Code: Alles auswählen

height&#58;auto; 
gib dem div eine feste größe und es funktioniert.

siehe auch...

https://www.css4you.de/example/overflow.html

Verfasst: 01.07.2009, 13:22
von Andreas I.
Ja, dann funktioniert overflow, aber das div hat dann nicht mehr automatisch die volle Bildschirmhöhe...