hallo profis,
ich bin z.z. an einem problem dran und ich komm nicht weiter. ich hoffe ich nerve nicht zu sehr.
vorab: ich hab schon gegoogelt und viele artikel gelesen aber ich komm trotzdem nicht weiter.
also es geht um folgenden code:
zuerst die css datei
[HTML]#startseite
{margin: 0 auto !important;
max-width: 900px;}
#startseite-group
{margin-top:10%;}
.section {
clear: both;
padding: 0px;
margin: 0px;
}
.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; }
.group:before,
.group:after {
content:"";
display:table;
}
.group:after {
clear:both;
}
.group {
zoom:1; /* For IE 6/7 */
}
.span_2_of_2 {
width: 100%;
}
.span_1_of_2 {
width: 49.2%;
}
@media only screen and (max-width: 480px) {
.col {
margin: 1% 0 1% 0%;
}
}
@media only screen and (max-width: 480px) {
.span_2_of_2 {
width: 100%;
}
.span_1_of_2 {
width: 100%;
}
}[/HTML]
und hier meine html ausgabe
[HTML]<body>
<div id="startseite">
<div id="startseite-group">
<div class="section group">
<div class="col span_1_of_2">
<img src="">
</div>
<div class="col span_1_of_2">
<a href=""><img src=""></a>
</div>
</div>
<div class="section group">
<div class="col span_1_of_2">
<a href=""><img src=""></a>
</div>
<div class="col span_1_of_2">
<a href="#"><img src=""></a>
</div>
</div>
</div>
</div>
</body>[/HTML]
meine vertikale ausrichtung (also das rechts& link gleicher abstand herrscht) erfolgt über:
[HTML]#startseite
{margin: 0 auto !important;
max-width: 900px;}[/HTML]
wie bekomme ich aber eine zentrierte horizontale ausrichtung? also das der abstand oben und unten identisch ist.
ich hab auch schon folgendes ausprobiert:
[HTML]display: table-cell;
vertical-align: middle;[/HTML]
aber da tut sich nichts
das ist die aktuelle situation, aber natürlich keine lösung:
soll nicht irritieren
[HTML]#startseite-group
{margin-top:10%;}[/HTML]
ich hoffe ihr könnt mir da weiter helfen