PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
3 Divs nebeneinander/zentriert in Container
Beitrag
<blockquote data-quote="exo" data-source="post: 811330" data-attributes="member: 25134"><p>Hiho,</p><p>ich habe mich jetzt nun doch mal durchgerungen unser neues Design komplett in CSS zu bauen und hänge jetzt ein wenig.</p><p></p><p>Also geht um eine Navigation die aus 3 Teilen besteht, wobei alle 3 Teile immer zentriert nebeneinander stehen sollen.</p><p></p><p>Das die DIV`s nebeneinander sind, habe ich schonmal geschafft, mein problem jetzt:</p><p>Die 3 Divs sind innerhalb eines Containers der 100% breit ist, im IE wird wundersamerweise die ganze geschichte Zentriert dargestellt - aber im FF nicht?!?!</p><p></p><p>Zum Veranschaulichen hier mal die Seite </p><p></p><p>der CSS Code:</p><p>[code]</p><p>body{</p><p> margin:0;</p><p> padding:0;</p><p>}</p><p>#main{</p><p> position:absolute;</p><p> min-width:100%;</p><p> min-height:100%;</p><p> padding:0;</p><p> margin:0;</p><p>}</p><p>#head_bg{</p><p> position:relative;</p><p> padding0;</p><p> margin-left:auto;</p><p> margin-right:auto;</p><p> height:244px;</p><p> width:100%;</p><p> background-image:url(Bilder/head_bg.gif);</p><p>}</p><p>#head_center{</p><p> position:relative;</p><p> background: url(Bilder/head_bg_middle.gif) no-repeat center;</p><p> padding:0;</p><p> margin:0;</p><p> height:244px;</p><p> min-width:100%;</p><p>}</p><p>#total_top{</p><p> position:relative;</p><p> background:url(Bilder/total_top.png) no-repeat center;</p><p> height:21px;</p><p> min-width:100%;</p><p> margin:0;</p><p> padding:0;</p><p>}</p><p>#nav{</p><p> position:relative;</p><p> margin:-96px auto;</p><p> padding:0 auto;</p><p> width:auto;</p><p> height:156px;</p><p> overflow:visible;</p><p> text-align:center;</p><p>}</p><p>#navleft{</p><p> background:url(Bilder/head_shadow_left.gif) no-repeat right;</p><p> height:156px;</p><p> width:29px;</p><p> float:left;</p><p>}</p><p>#navmiddle{</p><p> height:156px;</p><p> min-width:926px;</p><p> float:left;</p><p>}</p><p>#navright{</p><p> position:relative;</p><p> background:url(Bilder/head_shadow_right.gif) no-repeat left;</p><p> height:156px;</p><p> width:28px;</p><p> float:left;</p><p>}</p><p>#navbar{</p><p> position:relative;</p><p> border-top:solid 1px #fff;</p><p> margin:0;</p><p> background:url(Bilder/nav_bar.gif) center no-repeat;</p><p> width:926px;</p><p> height:26px;</p><p>}</p><p>#top5{</p><p> position:relative;</p><p> width:926px;</p><p> height:129px;</p><p> background-color:#fff;</p><p> padding:0;</p><p>}</p><p>[/code]</p><p></p><p>Und HTML:</p><p>[code]</p><p><body></p><p><div id="main"></p><p> <div id="head_bg"></p><p> <div id="head_center"></p><p> <div id="total_top"></div></p><p> </div></p><p> <div id="nav"></p><p> <div id="navleft"></div></p><p> <div id="navmiddle"></p><p> <div id="navbar"></div></p><p> <div id="top5"></div></p><p> </div></p><p> <div id="navright"></div></p><p> </div></p><p> </div></p><p></div></p><p></body></p><p>[/code]</p><p></p><p>danke schonmal für eure Hilfe</p><p></p><p>grüße</p></blockquote><p></p>
[QUOTE="exo, post: 811330, member: 25134"] Hiho, ich habe mich jetzt nun doch mal durchgerungen unser neues Design komplett in CSS zu bauen und hänge jetzt ein wenig. Also geht um eine Navigation die aus 3 Teilen besteht, wobei alle 3 Teile immer zentriert nebeneinander stehen sollen. Das die DIV`s nebeneinander sind, habe ich schonmal geschafft, mein problem jetzt: Die 3 Divs sind innerhalb eines Containers der 100% breit ist, im IE wird wundersamerweise die ganze geschichte Zentriert dargestellt - aber im FF nicht?!?! Zum Veranschaulichen hier mal die Seite der CSS Code: [code] body{ margin:0; padding:0; } #main{ position:absolute; min-width:100%; min-height:100%; padding:0; margin:0; } #head_bg{ position:relative; padding0; margin-left:auto; margin-right:auto; height:244px; width:100%; background-image:url(Bilder/head_bg.gif); } #head_center{ position:relative; background: url(Bilder/head_bg_middle.gif) no-repeat center; padding:0; margin:0; height:244px; min-width:100%; } #total_top{ position:relative; background:url(Bilder/total_top.png) no-repeat center; height:21px; min-width:100%; margin:0; padding:0; } #nav{ position:relative; margin:-96px auto; padding:0 auto; width:auto; height:156px; overflow:visible; text-align:center; } #navleft{ background:url(Bilder/head_shadow_left.gif) no-repeat right; height:156px; width:29px; float:left; } #navmiddle{ height:156px; min-width:926px; float:left; } #navright{ position:relative; background:url(Bilder/head_shadow_right.gif) no-repeat left; height:156px; width:28px; float:left; } #navbar{ position:relative; border-top:solid 1px #fff; margin:0; background:url(Bilder/nav_bar.gif) center no-repeat; width:926px; height:26px; } #top5{ position:relative; width:926px; height:129px; background-color:#fff; padding:0; } [/code] Und HTML: [code] <body> <div id="main"> <div id="head_bg"> <div id="head_center"> <div id="total_top"></div> </div> <div id="nav"> <div id="navleft"></div> <div id="navmiddle"> <div id="navbar"></div> <div id="top5"></div> </div> <div id="navright"></div> </div> </div> </div> </body> [/code] danke schonmal für eure Hilfe grüße [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 5, ▼ = 2 und ■ = 7, was ist ▲ × ▼ + ■?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
3 Divs nebeneinander/zentriert in Container
Oben