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:

  1. add display:inline-block
  2. add float:left

either shrink container div fit contents.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -