html - Inline block - align to right? -
i'm trying 'add' , search box sit next each other, side side , align them right.
i've checked out other answers , have implemented inline-block solution, sit side side (but reason it's not working on fiddle). how can align elements right of parent?
<div class="span6"> <h2 class="pull-left">title</h2> </div> <nav class="span6"> <form action="/gateway" method="get"> <input name="search" size="10" type="search" placeholder="search" results=5> </form> <a class="btn" href="/add">add</a> </nav>
jsfiddle not use scss default. expand languages menu on left , choose "scss" instead of "css". should result in elements aligning side-by-side.
to align nav right, make both span6's 50% width , float/text-align nav right.
.span6{ float: left; width: 50%; } nav{ float: right; text-align: right; ... }
Comments
Post a Comment