|
|||
Margin(-Bottom) funktioniert nicht
Hallo,
ich habe mein CSS-Design jetzt soweit fertig, jedoch noch ein letzten Problem. Das Design besteht aus 4 Boxen, ich möchte jetzt, dass diese Boxen nicht unten direkt am Ende des Bildschirms kleben, sondern z.B. einen Abstand vom unteren Rand von 50px haben. Ich weiss jedoch leider nicht wie/wo ich das hinschreiben muss, vielleicht könnt ihr mir helfen. Hier mal mein Stylesheet: Code:
<!-- html { margin:0px; padding:0px; } body { background-color:#FFFFFF; color:#000000; font-size:10px; margin:0px; padding:0px; } a { background-color:transparent; color:#0000FF; font-size:10px; text-decoration:none; } a, p, h3, h4, pre { margin:3px; padding:5px 11px; } h2 { font-size:15px; color:#000000; background-color:transparent; } h3 { background-color:transparent; color:#000000; font-size:14px; } h4 { background-color:transparent; color:#000000; font-size:11px; text-transform:uppercase; } #kopf { position:absolute; text-align:center; top:18px; width:100%; } #box1 { background-color:#FFFF00; left:2%; position:absolute; top:80px; width:23%; } #box2 { background-color:#FFFF00; left:26%; position:absolute; top:80px; width:24%; } #box3 { background-color:#FFFF00; left:51%; position:absolute; top:80px; width:24%; } #box4 { background-color:#FFFF00; left:76%; position:absolute; top:80px; width:22%; } #box1, #box2, #box3, #box4 { border:1px dashed #000000; margin:0px; padding:0px; } --> Gruß Stefan |
Sponsored Links |
|
|||
OK:
Code:
<body> <div id="kopf"> <h2>Titel</titel></h2> <div id="box1"> <h4>Titel</h4> Text </div> <div id="box2"> <h4>Titel</h4> Text </div> <div id="box3"> <h4>Titel</h4> Text </div> <div id=box4"> <h4>Titel</h4> Text </div> </body> </html> |
|
|||
Code:
div { padding-bottom:50px; } Zitat:
|
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Anfänger: Positionierung. | xam | CSS | 3 | 19.05.2012 14:18 |
joomla template | wrock | CSS | 2 | 06.04.2012 19:24 |
Schriftfarbe in den Eintragungsfeldern von jforms | Steveislucky | CSS | 2 | 16.03.2010 10:59 |
Problem mit CSS Style | flo007 | CSS | 3 | 25.01.2009 17:08 |
DIV immer ganze Breite - normal?!?!? | csski | CSS | 3 | 02.07.2008 12:20 |