html - CSS positioning help required -


i want make dropdown in list , making caret, div looks this

<div class="class-to-div1" id="{{ div.id }}" data-cardsnum="{{ div.num }}">                     <div class="col-md-2 list">                         <button onclick="text(this)" class="add-div btn btn-success btn-sm">add div</button>                         <button class="delete-div btn btn-danger btn-sm">delete div</button>                         <div class="class-to-div">                             {% innerdiv in div.innerdivs %}                                 <div class="list-item" data-column="{{ innerdiv.sveti_id }}" data-position="{{ innerdiv.position }}" id="{{ innerdiv.pk }}"> {{  innerdiv.text}} <span class="caret mycaret mydropdown"></span></div>                             {% endfor %}                         </div>                     </div>                 </div> 

i want <span> in right end of div class ".list-item", it's staying after {{ innerdiv.text }} whatever do.

for use float: right;. heres little bit floats.

html:

<div>     testing testing  <span>test</span>  </div> 

css:

div {     width: 80%;     height: 40px;     border: 1px solid; } span {     float: right; } 

demo here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -