5

Is it possible by HTML / CSS to display a row of elements at the bottom of a container, that wrap upwards if the container gets to small? Like if we would start writing at the bottom of a page and continue above the already written lines.

The elements do not need to be the words of an inline text, a collection of elements like SPAN or DIV placed text-like via float:left; for example would do either.

dronus
  • 10,774
  • 8
  • 54
  • 80

2 Answers2

3

Maybe using min-height so the box will expand upwards:

#container{
     position:relative;
     width: 300px;
     height: 200px;
     background: #f90;  
}      
#text-container{
    position: absolute;
    bottom: 0;
    width: 300px;
    min-height: 10%;
    background: #f00;        
}

http://jsfiddle.net/grainne/DD7dG/32/

questioner
  • 1,144
  • 4
  • 14
  • 22
  • That grows the whole block upwards from a given location, but doesn't wrap it's content bottom-up. The idea was that any additional line of text appends to the top rather to the bottom. – dronus Oct 29 '12 at 10:57
  • @dronus - you would need to use javascript to get this effect. – questioner Oct 29 '12 at 12:11
1

I don't think so. In fact, just having something "bottom-align" is already pretty involved. There are a few "close enough" workarounds, but nothing that's a true "vertical-align: bottom". Examples on websites with such elements have always turned out to be a bunch of JavaScript.

Basically, many others have tried to deal with this issue before.

Community
  • 1
  • 1
Kache
  • 15,647
  • 12
  • 51
  • 79