user1929946
user1929946

Reputation: 2503

divs next to each other, align to bottom

There are 3 divs next to each other:

<div style="left: float;">1</div>
<div style="left: float;">2</div>
<div style="left: float;">1</div>

which should looks like:

        content
        content
page 1  content  page 2

so page X should be aligned to bottom. I saw some "put relative to the parent, and absolute+bottom 0 for the child - aint no work!

Upvotes: 0

Views: 1176

Answers (1)

cimmanon
cimmanon

Reputation: 68319

Floats are a poor choice for this, you want your elements to be inline-block and adjust the vertical alignment:

http://tinker.io/f6b9e

div {
    display: inline-block;
    vertical-align: text-bottom;
}

<div>1</div>
<div>2</div>
<div>1</div>

Upvotes: 4

Related Questions