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: 8129
Total Answered: 1
Total Marked As Answer: 0
Posted On: 25-Nov-2015 23:05

Share:   fb twitter linkedin
Answers
Smith
Smith
Participant
360 Points
110 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
banner

Blog

Active User (0)

No Active User!
 Log In to Chat