+ Antworten
Ergebnis 1 bis 3 von 3

Thema: Hintergrund in dreispaltigen Layout

  1. #1
    TP-Supporter ansatz bringt sich richtig ein
    Registriert seit
    Feb 2006
    Beiträge
    441

    Hintergrund in dreispaltigen Layout

    Hallo und schönen Sonntag noch. Ich dachte ich hätte heute schon mal mein Thema (Frage) gepostet, aber wahrscheinlich nicht da ich es nicht wieder finde. So dann noch mal zu meinem Problem. Also ich habe ein Layout - fixes zentriertes Layout, mit Warpper für alles, Kopfnavi, Header und einem Wrapper für den Inhalt welcher dreispaltig ist. Nun mein Problem, das Hintergrundbild will einfach nicht angezeigt werden nur wenn ich dem wrapper eine Höhe gebe, funzt das, will ich aber nicht da der wrapper sich an den Spalten orientieren soll. Danke für einen Rat oder Hilfe. Beste Grüße Matthias.

    hier der Code zu:

    HTML-Code:
    <title>Unbenanntes Dokument</title>
    <style type="text/css">
    <!--
    /* default elements */
    *{margin:0;padding:0; border:0px}
    
    body,td,th {
    	font-family:  "Helvetica", Arial, sans-serif;
    	font-size: 12px;
    	color: #FFFFFF;
    	line-height: 18px;
    	font-style: normal;
    	margin: 0px;
    	background-color: #1A2946;
    }
    #wrapper {
    	width: 900px;
    	margin-top: 30px;
    	margin-right: auto;
    	margin-left: auto;
    	position: relative;
    }
    #headernav {
    	background-color: #1A2946;
    	height: 30px;
    	text-align: right;
    	padding-top: 10px;
    	padding-right: 10px;
    }
    #header {
    	background-image: url(images/banner.jpg);
    	height: 250px;
    }
    #wrapperContent {
    	background-image: url(images/bg.jpg);
    }
    #content {
    	padding-top: 10px;
    	padding-bottom: 10px;
    	width: 410px;
    	margin-right: 250px;
    	margin-left: 250px;
    	position: absolute;
    	left: 0px;
    	top: 300px;
    }
    #side1 {
    	width: 220px;
    	padding: 10px;
    	position: absolute;
    	left: 0px;
    	top: 300px;
    	}
    #side2 {
    	width: 220px;
    	padding-top: 10px;
    	padding-bottom: 10px;
    	padding-left: 10px;
    	position: absolute;
    	top: 300px;
    	right: 0px;
    }
    .clear {
    	clear: both;
    }
    /* text elements */
    h1 {
    	font-size: 18px;
    	font-style: normal;
    	color: #FFFFFF;
    	font-weight: normal;
    	margin-bottom: 10px;
    }
    h2 {
    	font-size: 16px;
    	font-style: normal;
    	color: #FFCD48;
    	line-height: 18px;
    	margin-bottom: 5px;
    	font-weight: normal;
    	background-image: url(images/pfeil.gif);
    	background-position: 0px 4px;
    	padding-left: 20px;
    	background-repeat: no-repeat;
    }
    p {
    	margin-bottom: 20px;
    }
    /* link elements */
    a:link , a:visited{
    	color: #FFBA03;
    	text-decoration: none;
    }
    a:hover , a:active{
    	color: #CC9900;
    }
    li {
    	margin-left: 40px;
    }
    ul {
    	margin-bottom: 10px;
    }
    
    -->
    </style>
    </head>
    <body>
    <div id="wrapper">
    <div id="headernav"></div><!--EndHeaderNav-->
    <div id="header"></div><!--EndHeader-->
    <div id="wrapperContent">
    <div id="side1"></div><!--END side1-->
    <div  id="side2"></div><!--END side2-->
    <div id="content"></div><!--END content-->  
    <div class="clear"></div>
    </div><!--END WrapperContent-->
    </div><!--END Wrapper-->
    </body>
    </html>
    Geändert von zulujaner (12.07.2009 um 22:47 Uhr)

  2. #2
    TP-Supporter sejuma bringt sich richtig ein
    Registriert seit
    Jun 2008
    Ort
    Ludwigshafen
    Beiträge
    343
    Deine drei "Spalten" sind absolut positioniert und befinden sich damit außerhalb des Elementflusses. Sie haben für den wrapper damit keinerlei Bedeutung.

    Verzichte auf die absolute Positionierung und verwende float- und margin-angaben, wie z.B. bei diesem Layout.
    Vor dem Schließen des #wrappers dann noch clearen.

  3. #3
    TP-Supporter ansatz bringt sich richtig ein
    Registriert seit
    Feb 2006
    Beiträge
    441
    Supi und danke, hat alles geklappt in O Komma nix. Danke.
    Ich hatte das ja auch schon mal mit der relativen Breite, habe da aber nicht das Boxmodell genügend beachtet, jetzt klappt es und das ist wichtig, besten Dank noch mal.

    Gruß Matthias

+ Antworten

Ähnliche Themen

  1. Antworten: 3
    Letzter Beitrag: 17.03.2009, 19:15
  2. fester Hintergrund - Hintergrund soll sich beim scrollen nicht bewegen
    Von webpagefutzi im Forum Webdesign allgemein
    Antworten: 10
    Letzter Beitrag: 09.09.2004, 13:45
  3. Antworten: 30
    Letzter Beitrag: 18.10.2003, 16:54
  4. Antworten: 2
    Letzter Beitrag: 25.05.2002, 19:48

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

     

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51