|
|||
CSS div Größe anpassen anhand des inhaltes
Hallo,
ich habe ein Problem. Ich habe ein div welches mir als Hintergrund dient. Darin befindet sich auf der linken Seite ein div welches noch mehrere andere menü-divs beinhaltet. auf der rechten seite ist ein div für den inhalt. Jetzt habe ich das Problem, das wenn ich viele Menüelemente habe, sich das hintergrund-div und das inhalt-div sich nicht in der Höhe anpassen. Was mache ich denn falsch? Die styles sind in der styles.css im selben verzeichnis. Danke schon mal |
Sponsored Links |
|
|||
http://www.xhtmlforum.de/viewtopic.php?t=1399
Ansonsten hört sich nach dem FLOAT-BUG an, Suchfunktion
__________________
</ulle> |
Sponsored Links |
|
|||
mal ohne Verlinkung
Code:
<style type="text/css"> div#top { height: 100px; border-bottom: 1px solid #000080; margin-top: 120px; border-top: 1px solid #000080; background: url(test2.jpg) no-repeat; text-align: right; } div#box { background-color: #F2F6FF; color: black; padding-top: 25px; padding-left: 25px; padding-right: 25px; padding-bottom: 20px; margin:10x 10px 10px 10px; } div#menucont { background-color: Blue; border: 0px; padding: 2px 2px 2px 2px; float: left; } div#content { border: 1px solid #A9A9A9; /*padding: 20px 20px;*/ margin: 0px 0px 0px 185px; background: #F8F8FF; background: url(back.jpg) no-repeat top right #F8F8FF; } </style> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>cms</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> </head> <body> <div id="top">[img]logo.gif[/img]</div> <div id="box"> <div id="menucont"> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> </div> <div id="content"> <h1>Anmeldung</h1> <p style="text-align: center;"> Bitte melden Sie sich an. </p> <p class="error"> </p> login.php </div> </div> <div id="bottom" style="clear:both;"> © M. Wegner, 2003-2004. </div> </body> </html> ich habe jetzt mal ein br mit clear:both; nach dem inhalt-div eingfügt, jetzt klappt es auch im Mozilla. Im ie besteht immer noch das alte Problem. Aber der Inhalt passt sich in seiner größe immer noch nicht an, nur der Hintergrund. |
|
|||
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> <!-- html,body { margin: 0; padding: 0; background-color: #FF9933; color: #000000; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 100.01%; } div#box { width: 100%; /* wegen IE-Float BUG ; VORSICHT BOX-MODEL*/ background-color: #F2F6FF; } div#menucont { background-color: Blue; border: 0px; padding: 2px 2px 2px 2px; float: left; } div#content { border: 1px solid #A9A9A9; /*padding: 20px 20px;*/ margin: 0px 0px 0px 185px; background: #F8F8FF; background: url(back.jpg) no-repeat top right #F8F8FF; } --> </style> </head> <body> <div id="box"> <div id="menucont"> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> <div class="menu"> <h1>Test</h1> test </div> </div> <div id="content"> <h1>Anmeldung</h1> bla bla bla bla bla bla bla bla </p> </div> <br style="clear:left;" /> </div> weiter......</p> </body> </html>
__________________
</ulle> |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Hintergrundbild via css sprite dynamisch am Div Container anpassen. | BallaBalla07 | CSS | 2 | 04.06.2013 16:40 |
css Text grösse | dubstep007 | CSS | 13 | 29.03.2013 15:41 |
Fragen zu CSS und Joomla | DOKTOR | CSS | 2 | 23.05.2011 20:29 |
Css Div Boxen relativ untereinander ausrichten | heinbloed | CSS | 1 | 24.01.2011 00:06 |
Brauche Hilfe: Schwarzes Nichts | Zwox | CSS | 10 | 19.11.2010 17:53 |