Link to home
Start Free TrialLog in
Avatar of elepil
elepil

asked on

How to do a <div> that 'hugs' its contents?

A <div> by default will try to expand to the full width of the browser viewport.

Is there a way I can make it try to "hug" its contents and follow the total width of all its internal elements instead?

Thanks.
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of elepil
elepil

ASKER

Thanks!