html - Relative DIV with auto width -
i have div
image , label in it. label must ontop of image made outer container div relative
.
but want container div
has same width image. can set 100%
width on label. don't know width of image before hand. loaded dynamically.
but container
div has 100%
width set it. there way let have width of image inside?
example: http://jsfiddle.net/sbnzu/391/
do 1 of following rules container:
- add
display:inline-block
- add
float:left
either shrink container div fit contents.
Comments
Post a Comment