Horizontally center a div in a div

Frank
Frank
26 Points
13 Posts

Hi,

I am working across div for align center. But it's not working my code is as: 

<div class="header"> 
<div class="header_inner"> 
<!--some content--> 
</div> 
</div>
 
<style> 
.header
position: fixed !important; 
top: 0px !important; 
left: 0px !important; 
margin: 0px; 
padding: 0px; 
background: #0F4F3A; 
width: 100%; 
z-index: 100;
.header_inner
min-width: 900px; 
max-width: 1366px; 
text-align: center;
</style>

please help.

Views: 9604
Total Answered: 1
Total Marked As Answer: 0
Posted On: 25-Nov-2015 23:05

Share:   fb twitter linkedin
Answers
Smith
Smith
2890 Points
78 Posts
         

Hi frank,

Change the .header_inner class css as: 

.header_inner
min-width: 900px; 
max-width: 1366px; 
margin: 0 auto;
}

 

I think it will work for you.

Posted On: 25-Nov-2015 23:25
 Log In to Chat