|
|||
overflow:scroll ... ohne feste größe
Hallo!
Ich bin neu hier und hoffe jemand kennt die lösung meines Problems. Auf meiner Seite habe ich eine Tabelle die mir ein Fenster darstellt: Mit Titelleiste, Menüleiste, Navigationsbalken neben Inhaltsbereich und Statusleiste. Die Tabelle benutze ich um die Größe für Titelleiste, Statusleiste usw. festzulegen und den Rest für mein Inhalts-DIV zu haben. Dieses habe ich auf Höhe/Breite 100% und will jetzt mit style="overflow:scroll" erreichen, dass übergroßer Inhalt gescrollt wird. Doch da machen mir die Browser einen Strich durch meine Logik. Hat jemand eine Idee?! Mein Workaround war ein div mit height:10px und overflow:visible noch dazwischenzuschachteln, was aber unerwünschte Seiteneffekte bringt. Ich bin sicher es gibt eine Lösung. So long ... Gruß, Markus PS: hier ein aufs wesentliche abgespecktes beispiel: Code:
<html> <head> <title>bitch</title> <style> .window { width:640px; height:480px; background-color:#113377; } .content { width:100%; height:100%; overflow:scroll; } </style> </head> <body> <div class="window"> <table width="100%" height="100%"> <tr><td>head</td></tr> <tr><td><div class="content">body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body </div></td></tr> <tr><td>foot</td></tr> </table> </div> </body> </html>
__________________
perfection is achieved when there\'s nothing left to take away |
Sponsored Links |
|
|||
Hi,
du musst für den <div class="content"> eine fixe Höhe angeben. Also z.B.: Code:
.content { width:640px; /* <-- Aenderung in fixe Angabe */ height:480px; /* <-- Aenderung in fixe Angabe */ overflow:scroll; } Gruß urklmurkl |
Sponsored Links |
|
|||
Enstschuldige die Frage,
aber was willst du mit dieser Konstruktion bezwecken? Du hast eine <div> auf eine feste Größe gesetzt, da drin eine Tabelle die sich auf den den gesamten Platz darin ausdehnt. Warum machst du die Tabelle nicht gleich auf diese feste Göße und lässt den äußeren Div weg? Warum muss der Inhaltdiv sich dann auch noch jeweils 100% ausdehnen? Wenn du doch sowieso eine feste Gesamtgröße hast. Weil head und foot sich ausdehnen können? Ich würde das Grundgerüst nochmal überdenken... Gruß urklmurkl |
|
|||
Oder du lässt besser die Tabelle weg. Offensichtlich willst du ja keinen tabellarischen Inhalt damit darstellen.
Code:
<div class="entry"> <h3>head</h3> body</p> <p class="foot">foot</p> </div> |
|
|||
Hmm. .. Danke erstmal für die Vorschläge
Ich will ein Fenster bauen, das man verschieben kann und in der Größe verändern kann ... deshalb der ganze Mist mit der Tabelle und dem scrollbaren Inhaltsbereich, dessen Größe ich nicht festlegen kann, wenn ich das äußere DIV ja vergrößern (/verkleinern) können will und neben den festen Fensterleisten der Inhalt den restlichen Raum ausfüllen soll... Leider funktioniert overflow:scroll offensichtlich nur bei Elementen die eine feste Größe haben.. Schade um diesen Ansatz :'( Bei meinem neuen Ansatz versuche ich jetzt das vergrößern und verkleinern aufs Inhalts-DIV zu verlegen und die Fenster-Elemente so geschickt drumrum zu platzieren, dass sie das alles mitmachen... Vermutlich reichts, das äußere DIV zu lassen, die Tabelle zu killen und die Fenster-Leisten auf 100% Breite zu setzen ??? Aber daran scheitere ich jetzt auch: Da jetzt der innere Bereich eine feste Breite hat und der äußere nicht, funktioniert % jetzt da nich ... vielleicht noch jemand ne Idee? Grüße
__________________
perfection is achieved when there\'s nothing left to take away |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
<a> feste Größe zuweisen? | Korasu | CSS | 2 | 17.01.2009 23:47 |
Feste Größe für Element a | mimii | CSS | 5 | 25.01.2008 10:41 |
3 Zeilen, oben und unten feste Größe, Mitte soll sich strecken | createc-media | CSS | 3 | 29.10.2007 14:45 |
3spaltiges Layout - mittlerer Container feste Größe | CrazyX | CSS | 6 | 06.05.2005 22:46 |
Feste Größe für Homepage? | pandabaerlie | (X)HTML | 1 | 14.06.2004 15:21 |