I am a beginner level web designer. This question might have been asked, but I have refered that answers too but they have not helped.
My problem is I have a div
called "header" and 3 divs inside this div
. These are not aligning to the center in the parent div
. I have tried many answers but they are not working.
Here is my code:
#header {
height: 176px;
text-align: center;
position: absolute;
}
#header div {
display: inline;
text-align: center;
margin: auto;
float: left;
position: relative;
}
#logo {
height: 156px;
width: 218px;
background-image: url(../images/logo_03.jpg);
}
#tagline {
width: 250px;
}
#badge {
width: 300px;
}
here is html code
<!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>Ebhar media</title>
<style type="text/css">
</style>
<link href="style/homestyle.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
min-width:1407px;
}
</style>
</head>
<body leftmargin="0px" topmargin="0px" marginwidth="0px" marginheight="0px">
<div id="base">
<div id="header" align="center">
<div id="logo"></div>
<div id="tagline">YOUR SUCESS IS OUR SUCESS</div>
<div id="badge">Content for id "badge" Goes Here</div>
</div>
<div id="navbar">Content for id "navbar" Goes Here</div>
</div>
</body>
</html>