Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrap HTML elements bottom to top

Tags:

css

word-wrap

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.

like image 287
dronus Avatar asked Oct 07 '22 04:10

dronus


2 Answers

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/

like image 159
grai Avatar answered Oct 12 '22 20:10

grai


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.

like image 24
Kache Avatar answered Oct 12 '22 22:10

Kache