Hi,
I want to center divs which are placed in a div.
I want to have a header then a main content area where I will have 3 Citynames +cityphotos per row. The problem is that I can not center those 3 columns of information.
I attached a screen shot because I believe it will explain you what I really want.
This is the HTML
This is the CSS
I want to center divs which are placed in a div.
I want to have a header then a main content area where I will have 3 Citynames +cityphotos per row. The problem is that I can not center those 3 columns of information.
I attached a screen shot because I believe it will explain you what I really want.
This is the HTML
HTML:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="countrylanding.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="header"><h1>Logo</h1></div>
<div class="citycontainer">
<div class="cityname">
<p>Brisbane ege ge eg</p>
</div>
<div class="cityphoto"><img src="3.jpg" /></div>
</div>
<div class="citycontainer">
<div class="cityname">
<p>Cairns</p>
</div>
<div class="cityphoto"><img src="3.jpg" /></div>
</div>
<div class="citycontainer">
<div class="cityname">
<p>Perth</p>
</div>
<div class="cityphoto"><img src="3.jpg" /></div>
</div>
</div><!--wrapper-->
</body>
</html>
This is the CSS
HTML:
@charset "UTF-8";
/* CSS Document */
div{
}
div#header {
margin:10px;
border:solid 1px;
width:auto;
}
div#wrapper {
position:relative;
border:solid 1px;
width:720px;
height:600px;
<!--background-color:#120957;-->
border:solid 1px;
margin-left:auto;
margin-right:auto;
}
div.citycontainer {
margin:5px;
border:solid 1px;
padding:5px;
float:left;
height:250px;
width:200px;
}
p{
text-align:center;
font-family:Verdana, Geneva, sans-serif;
font-size:14px;
font-weight:bold;
color:#CCC;
}