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,495
  • 38
  • 39
  • 67
Sune
  • 507
  • 2
  • 7
  • 17

2 Answers2

0

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

Asons
  • 81,773
  • 12
  • 93
  • 144
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,340
  • 4
  • 28
  • 49