zurück zur Startseite
  


Zurück XHTMLforum > (X)HTML und CSS > CSS
Seite neu laden overflow:scroll ... ohne feste größe

Antwort
 
LinkBack Themen-Optionen Ansicht
  #1 (permalink)  
Alt 10.02.2006, 23:28
Neuer Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 10.02.2006
Beiträge: 4
zelle befindet sich auf einem aufstrebenden Ast
Standard 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
Mit Zitat antworten
Sponsored Links
  #2 (permalink)  
Alt 12.02.2006, 16:57
Neuer Benutzer
neuer user
 
Registriert seit: 10.02.2006
Beiträge: 12
urklmurkl befindet sich auf einem aufstrebenden Ast
Standard

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;
         }
So hat es bei mir funktioniert. Mit % ging es bei mir auch nicht.

Gruß urklmurkl
Mit Zitat antworten
Sponsored Links
  #3 (permalink)  
Alt 12.02.2006, 17:19
Neuer Benutzer
neuer user
 
Registriert seit: 10.02.2006
Beiträge: 12
urklmurkl befindet sich auf einem aufstrebenden Ast
Standard

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
Mit Zitat antworten
  #4 (permalink)  
Alt 12.02.2006, 17:42
Erfahrener Benutzer
XHTMLforum-Mitglied
 
Registriert seit: 12.01.2006
Beiträge: 152
Achereto befindet sich auf einem aufstrebenden Ast
Standard

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>
Funktioniert mit dem richtigen CSS genauso und man verwendet genau die Elemente, die auch für die entsprechende Funktion gedacht sind.
Mit Zitat antworten
  #5 (permalink)  
Alt 12.02.2006, 19:21
Neuer Benutzer
neuer user
Thread-Ersteller
 
Registriert seit: 10.02.2006
Beiträge: 4
zelle befindet sich auf einem aufstrebenden Ast
Standard

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
Mit Zitat antworten
Antwort


Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus


Ä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


Alle Zeitangaben in WEZ +2. Es ist jetzt 12:57 Uhr.