Div-Container in Div-Container zentrieren

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Div-Container in Div-Container zentrieren

    Hallo,
    ich habe jetzt schon lange gegoogelt aber immer ohne erfolg.
    Hier im Forum habe ich auch leider nichts gefunden, dass mir konkret weiterhilft.

    Ich habe 2 Div-Container.
    Der erste bildet im Prinzip den äußeren Rahmen der Webseite. Diesen bekomme ich noch zentriert.
    Dann habe ich einen zweiten Div-Container, der im ersten liegt und über den via iframe der Inhalt angezeigt werden soll. Der zweite soll sich nur innerhalb der ersten Containers zentrieren.

    Im ersten Container soll eine Grafik eingefügt werden, über die ich mit "maps" die Links des Menüs setze.

    Bitte um Hilfe!
    Danke

  • #2
    Code:
    <body style="text-align:center;">
    <div style="text-align:center; margin-left:auto; margin-right:auto;">
    <div style="margin-left:auto; margin-right:auto; text-align:left;">
    test
    </div>
    </div>
    </body>
    Wenn das nicht geht ist was anderes falsch - background-color:red/blue/yellow hilft beim ermitteln des fehlerhaften Elements und Eingrenzen der Problematik~

    Ein netter Guide zum übersichtlichen Schreiben von PHP/MySQL-Code!

    bei Klammersetzung bevorzuge ich jedoch die JavaCoding-Standards
    Wie man Fragen richtig stellt

    Kommentar


    • #3
      klingt nach liquid column, google mal

      Kommentar


      • #4
        hier mal der aktuelle Ausschnitt, in dem schon nichts mehr funktioniert


        PHP-Code:
        <style type="text/css">
        #Layer {
           
        positionabsolute;
           
        top50%;
           
        left50%;
           
        width824px;
           
        height 400px;
           
        margin-top: -412px;
           
        margin-left: -2004px;
           
        border:1px solid #000000;
           
        padding:10px;
           
        overflow:auto;
        }
        -->
        </
        style>
        </
        head>

        <
        body bgcolor="#717171">
        <
        div id="Layer1" align="center" width:950pxheight:586px;
        z-index:1;"><img src="hintergrund.jpg" width="900" height="586" border="0" usemap="#Map">
        <map name="Map">
        <
        area shape="rect" coords="106,3,153,47" href="/news/home.php" target="iframe">
        <
        area shape="rect" coords="217,6,298,48" href="haftung.htm" target="iframe">
        <
        area shape="rect" coords="300,4,399,48" href="impressum.htm" target="iframe">
        <
        area shape="rect" coords="520,3,615,48" href="/myguestbook/guestbook.php" target="iframe">
        <
        area shape="rect" coords="719,4,794,46" href="tuning.htm" target="iframe">
        <
        area shape="rect" coords="619,4,714,47" href="/board" target="_blank">
        <
        area shape="rect" coords="157,3,213,47" href="links.htm" target="iframe">
        <
        area shape="rect" coords="404,4,517,47" href="contact.php" target="iframe">
        </
        map>
        </
        div>
        <
        div id="Layer"><iframe name="iframe" width=100height=100
        NORESIZE scrolling=Yes frameborder=0 marginheight=0 marginwidth=0 src="daten.htm"></iframe></div
        Zuletzt geändert von mKorniK; 10.07.2007, 23:12.

        Kommentar


        • #5
          Brich deinen Code bitte

          Was soll denn das hier?

          <div id="Layer1" align="center" width:950px; height:586px; z-index:1;">

          Kombiniere http://www.css4you.de/wslayout1/ex0003.html und http://www.alistapart.com/articles/negativemargins/ dann hast du's.

          Kommentar


          • #6
            Schuldigung,
            hab den Code gebrochen..

            Jetzt habe ich ein Problem.. Die erste Seite versuche ich jetzt umzusetzen.. jedoch ist die zweite auf Englisch. Das übersteigt leider meine Kenntnisse...

            Kommentar


            • #7
              Da kann ich dir leider nicht helfen, da die meistens Links von mir sind auf Englisch

              Kommentar


              • #8
                nach dem der o.g. Source gar nicht funktionierte stell ich jetzt noch einen anderen ein, in dem ich das, vom ersten Link umgesetzt habe. Wenn ich das gleiche beim zweiten DIV-Tag mache, dann liegt der Container unter dem zweiten...

                PHP-Code:
                <body text-align:centerbgcolor="#FFFFFF">
                <
                script type='text/javascript'>



                function 
                Go(){return}

                </
                script>
                <
                script type='text/javascript' src='exmplmenu_var.js'></script>
                <
                script type='text/javascript' src='menu_com.js'></script>
                <
                noscript>
                your browser does not support script
                </noscript>
                <
                div id="Layer1" style="margin:0px auto;text-align:left; width:950px; 
                height:586px;
                 z-index:1; left: 5px; top: 5px;"
                ><img src="hintergrund.jpg" width="900" height="586" border="0" usemap="#Map">
                  <
                map name="Map">
                    <
                area shape="rect" coords="313,11,343,20" href="/news/home.php" target="iframe">
                    <
                area shape="rect" coords="397,9,444,20" href="haftung.htm" target="iframe">
                    <
                area shape="rect" coords="455,8,515,21" href="impressum.htm" target="iframe">
                    <
                area shape="rect" coords="586,11,649,19" href="/myguestbook/guestbook.php" target="iframe">
                    <
                area shape="rect" coords="703,9,746,21" href="tuning.htm" target="iframe">
                    <
                area shape="rect" coords="751,9,798,21" href="design.htm" target="iframe">
                    <
                area shape="rect" coords="653,7,699,22" href="/board" target="_blank">
                    <
                area shape="rect" coords="807,10,866,20" href="/topsite" target="iframe">
                    <
                area shape="rect" coords="353,9,388,21" href="links.htm" target="iframe">
                    <
                area shape="rect" coords="526,10,574,20" href="contact.php" target="iframe">
                  </
                map>
                </
                div>
                <
                div id="Layer2" style="position:absolute; width:848px; height:316px; z-index:2; left: 29px; top: 243px;">
                <
                iframe name="iframe" width=100height=100NORESIZE 
                scrolling
                =auto frameborder=0 marginheight=0 marginwidth=0
                    src
                ="haftung.htm"></iframe></div

                Kommentar

                Lädt...
                X