Hallo,
ich weiß nicht ob ich hier im richtigen Unterforum bin... bin noch Anfänger.
Ich habe von meinem Vater den Auftrag bekommen, eine Seite zu entwickeln, auf der sich 20 Buttons befinden sollen. (In einer 4x5er Matrix angeordnet)
Mein Lösungsansatz sieht bis jetzt folgendermaßen aus: Titel ist vorerst egal
Mein Ansatz war es, 4 Spalten anzulegen in denen dann jeweils untereinander 5 Bilder (Buttons) je in einem DIV angezeigt werden. Die 5 Bilder deswegen je in einem DIV, damit ich die Abstände zwischen den Bildern (Buttons) variieren kann.
Mein Problem:
Ich kann die Bilder (Buttons) in einem DIV nicht vertikal mittig ausrichten.
Habe schon gegooglet und mehrer Lösungsansätze ausprobiert, jedoch ohne Erfolg.
Bin natürlich für Grundlegen andere Lösungsansätze was die Matrix angeht offen!
Meine CSS:
MfG
leumas
ich weiß nicht ob ich hier im richtigen Unterforum bin... bin noch Anfänger.
Ich habe von meinem Vater den Auftrag bekommen, eine Seite zu entwickeln, auf der sich 20 Buttons befinden sollen. (In einer 4x5er Matrix angeordnet)
Mein Lösungsansatz sieht bis jetzt folgendermaßen aus: Titel ist vorerst egal
Mein Ansatz war es, 4 Spalten anzulegen in denen dann jeweils untereinander 5 Bilder (Buttons) je in einem DIV angezeigt werden. Die 5 Bilder deswegen je in einem DIV, damit ich die Abstände zwischen den Bildern (Buttons) variieren kann.
Mein Problem:
Ich kann die Bilder (Buttons) in einem DIV nicht vertikal mittig ausrichten.
Habe schon gegooglet und mehrer Lösungsansätze ausprobiert, jedoch ohne Erfolg.
Bin natürlich für Grundlegen andere Lösungsansätze was die Matrix angeht offen!
HTML:
<html>
<head>
<title>Titel ist vorerst egal</title>
<link rel="stylesheet" type="text/css" href="data/style.css" />
</head>
<body>
<div id="main">
<div id="logo">
</div>
<div id="column">
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
</div>
<div id="column">
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
</div>
<div id="column">
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
</div>
<div id="column">
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
<div id="button"><a href="http://www.google.de"><img src="data/button.png" alt="button" width="122" height="42" border="0" /></a></div>
</div>
</div>
</body>
</html>
Meine CSS:
Code:
#main{
width:800px;
height:450px;
background:black;
border: 1px solid yellow;
/* Zentrierung */
left: 50%;
top: 50%;
position: absolute;
margin-left: -400px;
margin-top: -225px;
}
#logo{
float:top;
width:800px;
height:50px;
background:red;
}
#column{
width:200px;
height:400px;
background:blue;
float:left;
}
#button{
width:200px;
height:80px;
background:green;
text-align:center;
vertical-align: center; <-- funktioniert nicht
}
MfG
leumas