css - sizing a container based on the content -
the following screen shot of content part of form validation in website project that's in development phase:
this content contained in div specifies width 20%. prior adding rule div stretched horizontally across entire screen looked excessive short messages contained within. there way let div (or other appropriate container) automatically adjust width wide enough content contains?
you can display: inline-block
or float
. here demo http://codepen.io/anon/pen/vdicu/
Comments
Post a Comment