Ahojte,
Mam taky maly problem s pretekanim. Mam <div id=zaklad> v nom <div id=text>. #text ma height: auto, a ma sa zvacsovat podla toho kolko textu tam je. Ked vsak dam vela textu, pretecie div s textom rodicovsky div. Ak Rodicovskemu divu nastavim height: auto, ale v tom pripade sa ani nezobrazi. Ak dam height: auto, tak sa pravdaze zobrazi, ale pretecie to.
Dakujem za pripadne rady
HTML kod:
<body>
<div id="zaklad-y">
<div id="menu"></div>
<div id="zaklad">
<div id="text">
<div id="vrch"></div>
<div id="stred">
//nejaky text
</div>
<div id="dole"></div>
</div>
</div>
</div>
</body>
CSS kod:
html, body {
position: relative;
height: 100%;
width: 100%;
background-color: red;
margin: 0px;
padding: 0px;
}
#zaklad-y {
position: relative;
margin: auto;
padding: inherit;
height: auto;
width: 1024px;
background-color: green;
}
#menu {
position: absolute;
left: 60px;
height: 100%;
width: 169px;
background-color: blue;
z-index: 1;
}
#text {
position: relative;
left: 270px;
top:250px;
height: auto;
width: 700px;
background-color: gray;
}
#vrch {
position: relative;
background-image: url("vrchtext.png");
background-repeat: no-repeat;
width: 700px;
height: 20px;
}
#stred {
position: relative;
background-image: url("stredtext.png");
background-repeat: repeat-y;
width: 700px;
height: auto;
}
#dole {
position: relative;
background-image: url("doletext.png");
background-repeat: no-repeat;
width: 700px;
height: 55px;
}
|