As the title says
my code is something like this :
some text with line one, line two , line three <
-
I see no reason not to use position: absolute
.
See: http://jsfiddle.net/NeaR4/
CSS:
.container {
border: 2px dashed #444;
float: left;
position: relative
}
.container img {
display: block
}
.container > div {
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 14px;
background: #000;
background: rgba(0,0,0,0.7);
color: #fff;
overflow: hidden;
font: bold 14px Arial, sans-serif;
padding: 5px;
}
.container:hover > div {
height: auto
}
HTML:
some text with line oneeee, line twoooooooo ooooooo , line three