Image not in the right place[HTML/CSS] -


i want image(near-logo.png) in header-content div, in header div. image @ moment in left side, has in left side of header-content div. header div 100% width, header-content div 946px width.

<!doctype html> <html>     <head>         <title>webpage</title>         <link type="text/css" rel="stylesheet" href="stylesheet.css"/>     </head>     <body>         <div id="header">             <div class="header_content">                 <img src="img/near-logo.png"/>             </div>         </div>     </body> </html>  body {     margin:0;     padding:0; } #header {     background-color:#353c3e;     height:80px;     width:100%;     position:relative; }  .header-content {     width:946px;     position:absolute;     margin:0 auto; } 

i see 2 problems:

first thing, have mistake in css, class in div <div class="header_content">but in css it's .header-content.

second thing, delete position: absolute attribute if want header content centered.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -