How can I have a fluid width within a <div>?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CH757342
    New Member
    • Sep 2014
    • 1

    How can I have a fluid width within a <div>?

    I'm working on a laughably simple html code, but there's one thing I can't figure out. What I'm working on is basically an average calculator, and I need to figure out how to make the width of a <div> larger if the response is larger.

    For example, if you did the average of 3 and 4, you get 3.5, so the size of the box doesn't need to change. But if I did the average of 2222222 and 3333333, the answer is 2777777777.5. I want the <div> box to automatically become wide enough to allow that big number to appear on one line.

    If anyone can help, I would really appreciate it. Thank you!
Working...