troubleshooting Question

How do I have three divs on the same line with no new lines using only CSS?

Avatar of ctangent
ctangent asked on
Web Languages and StandardsHTMLCSS
10 Comments2 Solutions325 ViewsLast Modified:
I have a simple HTML page with three divs.
I want these three blocks to be on the same line with no newlines when the user goes to resize the browser. Is this possible in CSS?

The only way I know how to do this is with tables.

I also want to be able to have div1 and div3 be "fixed widths" but the second one to fill up the available space.
<div id="div1">
<p><span>Title</span></p>
<p>Text</p>
</div>
 
<div id="div2">
<p><span>Text</span></p>
<p>MoreText</p>
</div>
 
<div id="div3">
<p>Text and image</p>
</div>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 10 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 2 Answers and 10 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