troubleshooting Question

[SUPER-SIMPLE] Div's width the width of the widest child

Avatar of OliWarner
OliWarner asked on
Web Development
19 Comments1 Solution582 ViewsLast Modified:
I'm feeling really stupid today... This isnt the first thing I've fallen over while on my HTML escapades but here we go again...

I've got a div and I want it to only be as wise as the widest child. As far as I can tell, Divs default to 100% width, and that's no good and a set width isnt much use to me either because the content is going to change, so I need something that will stretch-to-fit. I *know* its simple but I just cannot remember it toady.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 19 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros