html - online div not side by side -
i have code below. have 1 container div 2 inner div. want 2 inner divs side side used in-line block on 2 divs. want 2 divs start on top. in demo below stuck on top , dont know why while in own project side side first div starts on top while second div not start on top.
what best css style make 2 div in container start on top while side side?
what best way make 2 div side side?
.homissync { display: block; height: 100%; } .homissync>div { padding: 27px; margin: 3px; display: inline-block; } #homissyncbuttons { height: 100vh; width: 20%; margin: 3px; } #homissynclist { height: 100vh; margin: 3px; width: 68%; } #homissyncbuttons .libuttons { width: 100% !important; background-color: #ff0000; } .vborder { border: solid 1px #ddd; } button, input[type=submit] { padding: 8px 20px; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,0.35); background-color: orange; font-size: 0.9rem; font-weight: bold; border-radius: 3px; border: 0; outline: none !important; margin: 3px 0; cursor: pointer; transition: background 1s ease-in-out; }
<div class=" homissync"> <div id="homissyncbuttons" class=" vborder"> <ul> <li> <button class="libuttons">uacs</button> </li> <li> <button class="libuttons">medicine</button> </li> <li> <button class="libuttons">non-drugs</button> </li> <li> <button class="libuttons">miscellaneous</button> </li> </ul> </div> <div id="homissynclist" class=" vborder"> <button class="listbuttons" id="new_uacs_entry">new uacs entry</button> <button class="listbuttons" id="update_uacs_entry">update uacs entry</button> <div id="homissynclistresult" class=" vpadding vborder"> </div> </div> </div>
please try code instead of display:inline-block;
, add float:left
.
.homissync>div { display: block; float: left; }
Comments
Post a Comment