|
|||
Content div legt sich nicht um div
iGWay.de | Webdesign, Webprogrammierung, Php, Css, Mysql, Webhosting, Gesamtpackete
"inhalt" und "info" (die hellblaue box) sind in "content" drinn (alles divs) ich will natürlich nen padding-bottom bei content von 20px - dann siehts schön aus und der hintergrund ist weis. jetzt aber legt sich content eben nicht um den inhalt div. ich kapiere nicht warum. ausschnitt aus dem betreffenden css code: Code:
div.rahmen { margin: 20px auto; margin-bottom:20px; padding:0px; width: 831px; border: 1px solid #666666; } div.header { height:225px; background-color:#010A7A; background-image:url(../header.jpg); background-position:0px 0px; background-repeat:no-repeat; } div.mainnav { padding-top: 189px; padding-right:0px; padding-left:0px; width:614px; margin:0 auto; } #nav { /*verschieben damit centered*/ /*margin-left:93px;*/ } div.inhalt { background:red; width:680px; float:left; margin-right:5px; margin-left:10px; margin-top:10px; } div.info { float:left; background-color:#010A7A; opacity: .2; filter: alpha(opacity=20); padding:5px; width:108px; height:140px; margin-left:5px; margin-top:15px; border:1px solid black; } div.content { padding-top:10px; padding-bottom:20px; margin:0px; background-color:white; /*background-image:url(../content_bg.jpg); background-repeat: no-repeat; background-position: center right;*/ } |
Sponsored Links |
|
||||
Wenn ich deinem Link folge, sehe ich keine CSS. *schulternzuck*
Du floatest zwei Elemente und ich sehe in deiner CSS und in deinem HTML Quelltext kein clear. Am besten schaust Du dir mal hier in den FAQ den Punkt 2 genauer an. Im übrigen bindet man so eine CSS ein: Code:
<link rel="stylesheet" type="text/css" href="" /> |
Sponsored Links |
|
||||
Zitat:
Für moderne Browser kannst Du dir das Markup auch sparen: Code:
div#content:after { content:"."; display:block; clear:both; height:0; visibility:hidden; } Aber Du solltest auf jeden Fall folgenden Artikel lesen: Clearing a float container without source markup Die zusätzliche clearfix Klasse kannst Du dir natürlich sparen (wegen der ID content). Geändert von ArcVieh (02.08.2007 um 02:30 Uhr) Grund: ID, nicht IE... Immer nur ärger mit dem Dingen. |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Seite links ausrichten | like.no.other | CSS | 10 | 26.01.2011 02:10 |
div höhe - 2 scrollbalken vermeiden | grubentaucher | CSS | 4 | 07.04.2010 12:16 |
Linkverhalten im IE6 | ChOpSueY! | CSS | 19 | 19.05.2008 23:48 |
3 div container, und content wird nicht größer | X2TSQy | CSS | 3 | 25.04.2008 20:22 |
flexibles Div soll Div mit fester Breite links umfliessen? | braindead | CSS | 3 | 23.09.2006 13:58 |