Vote count:
0
My "#pojat"-part just wont center. I've tried " width: 700px ; margin-left: auto ; margin-right: auto ;" also using % wont change anything, plz helpme.
It just wont go center, it goes "mostly" center and i dont know wtf is blocking my div centering.
body,
html {
margin:0;
padding:0;
color:#000;
background:#a7a09a;
}
#wrap {
margin:0 auto;
background:#99c;
}
#header {
padding:5px 10px;
background:#ddd;
}
h1 {
margin:0;
text-align: center;
}
#pojat {
width: 95%;
margin-left: auto;
margin-right: auto;
background-color: #b0e0e6;
text-align: justify;
}
h2 {
margin:0 0 1em;
text-align: center;
}
#Ilkka {
float:left;
display: inline;
width:200px;
padding:10px;
background:#99c;
}
#Lari {
float:left;
display: inline;
width:200px;
padding:10px;
background:#99c;
}
#Jaakko {
float:left;
display: inline;
width:200px;
padding:10px;
background:#99c;
}
#footer {
clear:both;
padding:5px 10px;
background:#cc9;
}
#footer p {
margin:0;
}
* html #footer {
height:1px;
}
@media only screen and (max-width: 600px) {
max-width: 99%:
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://ift.tt/nYkKzf">
<html lang="en">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Responsive Design By Poikabändi</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="wrap">
<div id="header"><h1>PoikaBändi</h1></div>
<div id="pojat">
<div id="Ilkka">
<h2>Ilkka</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris vel magna.</p>
</div>
<div id="Lari">
<h2>Lari</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris vel magna.</p>
</div>
<div id="Jaakko">
<h2>Jaakko</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris vel magna.</p>
</div>
</div>
<div id="footer">
<p>Footer</p>
</div>
</div>
</body>
</html>
asked 52 secs ago
How to center my DIV, it wont go
Aucun commentaire:
Enregistrer un commentaire