.nav - the panel where two divs are located

.divnal - the very two blocks

.devnav{ margin-left: 250px; width: 20%; display: inline-block; text-align: center; color: #ffffff; margin-top: 15px; font-size: 18px;} .nav{ height: 99px; background: #3351eb;} 

It works perfectly on a native monitor (1280x1024) - http://i.stack.imgur.com/la3nB.png

but if I check, for example, on the largest monitor, it does not at all correspond to what I have. http://i.stack.imgur.com/nd0as.png

Changed the code

 .devnav{ width: 50%; float: left; text-align: center; color: #ffffff; margin-top: 15px; font-size: 18px;} 

Only again the problem is that on the big screens they move away from each other http://i.stack.imgur.com/zZ87i.png

    2 answers 2

    Do something like this

    HTML:

     <div class="nav"> <div class="inner-wrap"> <div class="devnav"></div> <div class="devnav"></div> </div> </div> 

    CSS:

     .nav { width:100%; height:99px; } .inner-wrap { width:960px; margin:0 auto } .devnav{ width: 50%; float: left; text-align: center; color: #ffffff; margin-top: 15px; font-size: 18px;} 
    • What you need. Thank! - FLWRZ4U
    • close the question) - Maks Devda
    • @ user207012, if the answer helped, mark it with a solution. - HamSter
    • Please tell me how to do this? - FLWRZ4U
    • what exactly to do? - Maks Devda

    Width to make half

     width:50%; 

    And remove the margin.

    • in .nav or .devnav? - FLWRZ4U
    • made. Now I got everything upright - FLWRZ4U
    • I understood the thought, now I just need to put them horizontally. Just do not understand why this line does not work: display: inline-block; - FLWRZ4U
    • I will try to apply float - FLWRZ4U