SN-Moderator
Neues Mitglied
Hi Freunde,
ich heute schon zum zweiten Mal ...
Diesmal mit der Frage, wie ich meine Div-Container mittig einbringen kann. Die Website bleibt SmartNews.de - Tech, Specs & More .
Die Struktur des HTML-Codes sieht so aus:
--> Mainpage ( Mainpage hat eine breite von 100%)
--> Header (Breite: 1000px)
--> Banner
--> Bar (SocialBar)
--> Content (Breite: 1000px)
--> Article
--> Gadgets
--> Impressum (Impressum ist auch 100% breit)
Seit ich die Mainpage und das Impressum auf 100 % gestellt habe ist der Impressum-Container zwar breit genug, doch der Rest ist seit dem linksbündig.
Hier mein CSS-Code:
Wie zentriere ich die restlichen Div-Container ?
ich heute schon zum zweiten Mal ...
Diesmal mit der Frage, wie ich meine Div-Container mittig einbringen kann. Die Website bleibt SmartNews.de - Tech, Specs & More .
Die Struktur des HTML-Codes sieht so aus:
--> Mainpage ( Mainpage hat eine breite von 100%)
--> Header (Breite: 1000px)
--> Banner
--> Bar (SocialBar)
--> Content (Breite: 1000px)
--> Article
--> Gadgets
--> Impressum (Impressum ist auch 100% breit)
Seit ich die Mainpage und das Impressum auf 100 % gestellt habe ist der Impressum-Container zwar breit genug, doch der Rest ist seit dem linksbündig.
Hier mein CSS-Code:
Code:
body { background-image: url("../img/trivia/Background.png");
background-attachment: none;
text-align: center;
}
#Mainpage {
margin: 0 auto;
width: 100%;
text-align: center;
}
#Header {
width: 1000px;
}
#Banner {
background-image: url("../img/trivia/JellyBeans.png");
width: 650px;
height: 150px;
float: left;
/* border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px; */
}
#Banner h1 {
font-weight: bold;
font-size: 50px;
color: white;
}
#Banner h2 {
font-weight: bold;
font-size: 24px;
color: white;
position: relative;
bottom: 30px;
}
#Bar {
float: right;
width: 340px;
height: 150px;
background: yellow;
/* border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px; */
}
#clearen {
clear: both;
}
#Content {
width: 1000px;
}
#Articles {
background: red;
width: 640px;
height: 800px;
float: left;
margin-top: 10px;
/* border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px; */
}
#Gadget01 {
background: yellow;
width: 350px;
height: 200px;
float: right;
margin-top: 10px;
}
#Gadget02 {
background: yellow;
width: 350px;
height: 200px;
float: right;
margin-top: 10px;
}
#Gadget03 {
background: yellow;
width: 350px;
height: 200px;
float: right;
margin-top: 10px;
}
#Impressum {
width: 100%;
height: 220px;
background: grey;
margin-top: 30px;
text-align: center;
/* border-radius: 15px;
-o-border-radius: 15px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px; */
}
Wie zentriere ich die restlichen Div-Container ?