html - css, float alternative -



html - css, float alternative -

in web app have toolbar, it's div:

the div has 3 spans. contents of 3 spans filled later.

and size of individual spans differ every time.

<div> <span id="ab1" style="display: inline-block;"></span> <span id="ab2" style="display: inline-block;"></span> <span id="ab3" style="display: inline-block;"></span> </div>

now, want, span "ab1" should placed on left, "ab2" , "ab3" on right side on div.

is possibe without float right/left?

use position:absolute , text-align:right

css

div{background:red; text-align:right; position:relative} #ab1{ position:absolute; left:0; background:yellow;} #ab2{background:yellow; } #ab3{background:yellow; }

demo

html css

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -