Anzeige: united-domains - Die ganze Welt der Domains
Einfache & schnelle Domain-Registrierung zu fairen Preisen ohne Einrichtungsgebühren. Mehr als 250 Domain-Endungen aus einer Hand inklusive E-Mail- & Web-Weiterleitung. Einzigartiges Domain-Portfolio zur bequemen & sicheren Verwaltung Ihrer Domain-Namen.
Jetzt Domain-Check bei united-domains!
Div in selber höhe wie vorgänger
Autor: SvenWilson
Datum: 28.12.2011 01:03:02
Hallo allerseits
Das Main-Div hat die volle höhe des Fensters. Nun möchte ich aber das Border-Left / Border-Right gleich hoch sind.
Was mache ich falsch???
Besten Dank
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="margin: 0; padding: 0; height: 100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>X</title>
</head>
<body style="background-image: url(_layout/bg_main.png); margin: 0; padding: 0; height: 100%">
    <!-- Master Div -->
<div style="width: 1100px; margin: auto; min-height: 100%; height:auto !important; height: 100%; background-color: blue;">
        <!-- Border left -->
        <div style="background-image: url(_layout/bor_left.png); width: 25px; height: 100%; float: left;"></div>
        <!-- Slave Div -->
        <div style="width: 1030px; height: 100%; background-color: white; float: left; padding-left: 10px; padding-right: 10px;">
       
    <div style="background-image: url(_layout/hea_main.jpg); background-repeat: no-repeat; height: 90px; width: 1030px; margin-top: 20px; margin-bottom: 20px;">
       
      </div>
       
        <div style="border-top: #CCC thin dotted; border-bottom: #CCC thin dotted; height: 30px; width: 1030px;">
        Navigation
      </div>
   
    </div>
       
        <!-- Border right -->
        <div style="background-image: url(_layout/bor_right.png); width: 25px; height: 100%; float: left;"></div>
       
  </div>   
</body>
</html>
Re: Div in selber höhe wie vorgänger
Autor: Netinja
Datum: 07.01.2012 14:47:05
> Hallo allerseits
>
> Das Main-Div hat die volle höhe des Fensters. Nun
> möchte ich aber das Border-Left / Border-Right
> gleich hoch sind.
>
> Was mache ich falsch???
Hallo
Schreib doch erstmal alle CSS-Eigenschaften in ein internes Stylesheet, das du im <head> einbindest. Andernfalls wird es mühsam, mit deiner Datei zu testen.
"style="margin: 0; padding: 0; height: 100%" gehört nicht in die 3. Zeile, das ergibt einen Fehler im Validator.
http://validator.w3.org/check
LG
Netinja