Guten Morgen zusammen,
ich habe bisher Hintergründe immer recht kompfortabel mit den Befehlen "left:50%" und "margin-left:-(halbe Bildbreite)px" zentriert. Wurde die Browserbreite geändert, war das Bild trotzdem mittig.
Jetzt möchte ich für unsere Pension eine Seite erstellen, habe den Hintergrund wie immer formatiert, allerdings funktioniert es einfach nicht mehr. Das Bild ist zwar mittig, allerdings fehlt mir auf der rechten Bildschirmseite immer etwas. Schaut mal bitte drauf, vielleicht sehe ich den Wald einfach nur vor lauter Bäumen nicht.
HTML:
CSS:Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd"> <html xmlns="http://w3.org/1999/xhtml" lang="<?php echo $this->language; ?>" xml:lang="<?php echo $this->language; ?>"> <head> <jdoc:include type="head" /> <link href="/templates/hdo1.0.0/css/template.css" rel="stylesheet" type="text/css" /> <link href="/templates/system/css/system.css" rel="stylesheet" type="text/css" /> <link href="/templates/system/css/general.css" rel="stylesheet" type="text/css" /> <link rel="shortcut icon" href="favicon.ico" /> </head> <body> <div id="head"> <div id="headtop"> <div id="logo"></div> <div id="bar1"></div> </div> <div id="headmiddle"> <div id="nav1"> <div id="nav2"><jdoc:include type="modules" name="nav2" style="xhtml" /></div> </div> </div> <div id="headfooter"></div> </div> <div id="middle"> <div id="content1"><jdoc:include type="modules" name="content1" style="xhtml" /></div> <div id="content"><jdoc:include type="component" style="xhtml" /></div> <div id="content2"><jdoc:include type="modules" name="content2" style="xhtml" /></div> </div <div id="footer"> <div id="cont1"><jdoc:include type="modules" name="cont1" style="xhtml" /></div> <div id="cont2"><jdoc:include type="modules" name="cont2" style="xhtml" /></div> <div id="cont3"><jdoc:include type="modules" name="cont3" style="xhtml" /></div> <div id="cont4"><jdoc:include type="modules" name="cont4" style="xhtml" /></div> <div id="cont5"><jdoc:include type="modules" name="cont5" style="xhtml" /></div> </div> </body> </html>
Danke schon mal für Eure schnelle Hilfe.Code:html { margin-bottom: 1px; height:100% !important; } ul.menu,.moduletable ul { list-style: none; } body { font-family:"Times New Romance",Georgia,Helvetica,Arial,sans-serif; padding: 0px; margin: 0px 0px 0px 0px; background:#3a3a3a; } #head { width:100%; height:490px; float:left; position:relative; } #headtop { width:100%; height:90px; float:left; position:relative; } #logo { width:196px; height:70px; float:left; position:relative; background-image:url(../images/logo.png); left: 50%; margin-left:-98px; margin-top:10px; } #bar1 { width:100%; height:10px; float:left; position:relative; background:#232323; margin:10px 0px 0px 0px; } #headmiddle { width:100%; height:400px; float:left; position:absolute; background-image:url(/images/hg.png); margin-left:-1000px; left:50%; margin-top:100px; } /**DAS PROBLEMKIND**/ #headfooter { width:100%; height:15px; float:left; position:relative; background:#232323; margin:410px 0px 0px 0px; } #middle { width:950px; min-height:350px; float:left; position:absolute; background-image:url(/images/bg.png); margin-left:-475px; left:50%; margin-top:400px; }
Schöne Grüße aus dem inzwischen zugeschneiten Allgäu
Mats


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen