Place divs around a centered div in CSS -


i have 3 divs. 'middle' div needs centered in containing element (a seperate div width of page, basically) while other 2 divs should on either side of 'middle' div.

here i've tried far, can see, if left , right divs aren't in width, push 'middle' div off center.

<div class='cont'>     <div class='name2'>the man 6 fingers</div>     <div class='vs'>vs.</div>     <div class='name1'>i. montoya</div> </div>  .cont{   position:fixed;   top:0px;   width:100%;   background-color:red;   text-align:center; } .cont >div{     display:inline-block; } 

http://jsfiddle.net/7tlsa/

the solution needs work in webkit since in mobile app.

i adjusted widths, min-width, , white space tweak responsiveness. you're looking for?

see demo

.name1, .name2 {     width:30%;     min-width:160px;     white-space:nowrap; } 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -