1

Hi I have some html that looks like this:

<div id="wrapper" style="background-color: red;">

    <div style="margin: 0px auto; width: 960px;">

        Text here...

    </div>

</div>

The wrapper-div doesn't fit the <body>, when I resize the browser window to be lower than 960px, the wrapper gets as small as the browser window size. I want to get the wrapper at least as wide as the content inside it. I really have a hard time figuring this one out. Any suggestions?

CRABOLO
  • 8,605
  • 39
  • 41
  • 68
Sune
  • 607
  • 2
  • 8
  • 17

2 Answers2

0

Set wrappers style to: min-width: 960px .. same as inner div

Asons
  • 84,923
  • 12
  • 110
  • 165
0

Set the width of upper div

<div id="wrapper" style="background-color: red; width: 960px;">

    <div style="margin: 0px auto;">

        Text here...

    </div>

</div>

for a detailed description refer this

Community
  • 1
  • 1
Sid M
  • 4,354
  • 4
  • 30
  • 50