- Registriert
- 25.05.08
- Beiträge
- 13
hiho... ich hätte mal ne frage an die html/css spezialisten... ich schildere mal kurz das problem:
grundlegend will ich einen div-container so plazieren, dass er zum rand hin immer 16px abstand hat - aber nicht fixed, sondern absolute ... das problem was dabei auftaucht ist beim overflow der div-box... ich habe mal ein paar screenshots gemacht...
einmal ohne overflow:
http://img25.imageshack.us/i/56920366.tif/
mit overflow - nich runtergescrollt:
http://img15.imageshack.us/i/43736347.tif/
mit overflow - runtergescrollt:
http://img246.imageshack.us/i/42713380.tif/
ich will quasi, dass die div-box mit dem herunterscrollen "mitwandert"... nun noch kurz der css-code:
html, body {
margin: 0;
padding: 0;
background: rgb(255,255,255);
overflow: auto;
}
#background {
position: absolute;
margin: 0;
padding: 0;
right: 16px;
bottom: 16px;
top: 16px;
left: 16px;
background: rgb(241,241,241);
z-index: 1;
border: none;
overflow: visible;
}
wenn ich overflow: hidden setze, dann kann man nicht scrollen...
ich danke euch schon mal
lg marcel
grundlegend will ich einen div-container so plazieren, dass er zum rand hin immer 16px abstand hat - aber nicht fixed, sondern absolute ... das problem was dabei auftaucht ist beim overflow der div-box... ich habe mal ein paar screenshots gemacht...
einmal ohne overflow:
http://img25.imageshack.us/i/56920366.tif/
mit overflow - nich runtergescrollt:
http://img15.imageshack.us/i/43736347.tif/
mit overflow - runtergescrollt:
http://img246.imageshack.us/i/42713380.tif/
ich will quasi, dass die div-box mit dem herunterscrollen "mitwandert"... nun noch kurz der css-code:
html, body {
margin: 0;
padding: 0;
background: rgb(255,255,255);
overflow: auto;
}
#background {
position: absolute;
margin: 0;
padding: 0;
right: 16px;
bottom: 16px;
top: 16px;
left: 16px;
background: rgb(241,241,241);
z-index: 1;
border: none;
overflow: visible;
}
wenn ich overflow: hidden setze, dann kann man nicht scrollen...
ich danke euch schon mal
lg marcel