• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Warum geht das nicht?????

milchkuh

New member
Hallo,
warum werden bei mir jetzt keine Container generiert?????
Das sollte doch gehen, dass sie automatisch eine Breite haben, oder????

HTML:
<style type="text/css">

.box-left   {
background-color:#DF37B2;
border:1px solid;
height:100px;
float:left;
margin-left:10px;
width:auto;
}

.box-right {
background-color:#ffffff;
border:1px solid;
height:100px;
float:right;
width:auto;
} 
</style>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<div class="box-right"></div>
<div class="box-left"></div>
</body>
</html>
 
ja eben das is ja das Problem, die Breite kann ich nicht angeben, weil beide mit 15% vom Rand des Browserfensters entfrent sind...
Die Container sollen sich anpassen...
Geht denn das überhaupt???
 
Hä? Was Leeres mit automatischer Breite hat keine Breite - pack was rein, sonst werden die nich breit!
 
Wenn die 15% vom Browserfenster entfernt sein sollen und wahrscheinlich auch 15% von sich selbst, so ist das eine einfache Rechenaufgabe:
15% vom linken Rand, 15% von sich selbst, 15% von rechten Rand=
55% insgesamt geteilt durch 2 = 27.5%.

Da das aber etwas ungenau sein kann, würde ich folgendes vorschlagen:
14% links. 14% rechts, bleiben 72%, minus 14% wegen dem inneren Abstand = 68%.
Also müsste ein div 34% haben...
 
Woher sollen die 10px denn kommen? Schau Dir Dein Konstrukt einfach mal genau an...

Edit - @dkdenz: Du immer mit der Mathematik. :D
 
Ey, ich habe da grade ziemlich lange für gebraucht...
@milchkuh: leider (oder logischerweise) kann man keine Prozentangaben mit Pixelangaben mischen...
 
Also meine Wesite sollte 4 boxen haben, und zwar sollten sie so wie auf der untenstehenden grafik angeordnet sein(und auch alle zentreiert):

is.php
 
@dkdenz ja sorry ich finde es ja nett das du dir dafür zeit nimmst... aber ich habe überhaupt nichts davon kapiert was du mir vorgerechnet hast... sorry
 
ja du is sonst okey ich habs gerade geschafft hehe... aber danke...


HTML:
#contentcenter	{
text-align:center;
margin: auto;
width:691px;
background-color:#FACFEE;
border:1px solid; 
}

#box-top	{
background-color:#DF37B2;
margin-top:-1px;
border-top:1px solid;
boder-left:1px solid;
border-right:1px solid;
height:130px;
width:691px;
}
#box-links	{
background-color:#DF37B2;
border:1px solid;
margin-top:-1px;
margin-left:-1px;
height:22px;
width:691px;
}

#box-left   {
float:left;
background-color:#DF37B2;
border:1px solid;
border-color:#000000;
margin-top:5px;
margin-left:-1px;
height:425px;
width:156px;
}

#box-right {
background-color:#ffffff;
border:1px solid;
border-right:0px;
float:left;
margin-top:5px;
margin-left:10px;
height:425px;
width:522px;
} 

#box-bottom{
background-color:#DF37B2;
border:1px solid;
margin-top:437px;
margin-bottom:20px;
margin-left:-1px;
height:22px;
width:691px;
}

a.navi:link {
border:1px solid;
border-left:1px solid;
margin:0px;
margin-left:-1px;
padding-top:0px;
padding-bottom:6px;
padding-left:8px;
padding-right:8px;
color:#000000;
letter-spacing:2pt;
text-decoration:none;
font-family: Arial;
}

a.navi:hover {
border:1px solid;
border-left:1px solid;
margin:0px;
margin-left:-1px;
padding-top:0px;
padding-bottom:6px;
padding-left:8px;
padding-right:8px;
letter-spacing:2pt;
background-color:#ED5DC6;
}
h1 {
font-size:13px;
font-variant:small-caps;
color:#000000;
text-align:center;
text-decoration:underline;
letter-spacing:2px;
font-family: Arial;
cursor:default;
}

h2 {
text-align:center;
color:#FFFFFF;
}
h2.hov2:hover {
color:#CCCCCC;
}
h3 {
text-align:center;
font-variant:small-caps;
font-size:12px;
font-weight:100;
letter-spacing:1px;
font-family: Arial;
cursor:default;
}
h4 {
text-align:center;
}
h5 {
text-align:left;
font-size:12px;
margin-top:5px;
margin-left:4px;
font-family: Arial;
font-weight:50;
letter-spacing:1px;
}



aber vielleicht findest du ja noch ein paar schönheitsfehler... denn im IE gehts glaub ned so richtig...
 
100% relative Breite
100px feste Breite

Letzteres ist die Vorraussetzung das Dein Vorhaben funktioniert.
 
Zurück
Oben