html - How can I put two divs on the same line? -


i have 2 divs , want align them in same line. html code is:

<div class="box"> <div class="boxleft"> </div> <div class="boxright"> </div> </div> 

i tried 'float: left;' , 'float: right;' background going crazy, apears on ~30px of height. tried put height('till didn't use height in css). didnt' work. tried 'display: inline-block' too, without succes.

thanks.

css:

.box { width: 956px; margin-left: auto; margin-right: auto; background: #584231;}  .boxleft { width: 706px; margin-right: auto; border-right: 2px solid black;}   .boxright { width: 250px; margin-left: auto; float: right;} 

on modern browsers nowadays display: table-cell better alternative floating.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -