css- wrapper

I have a question regarding defining background with/height:

Normally i define a wrapper like:

#wrapper {
background-repeat:no-repeat;
background-image:url(../grafik/backgroundm.jpg);  
position: absolute;
height:916px;
width:1600px;  
z-index: 0;
left: 50%;
margin-left: -800px;
top:0px;
}

That center the background as it should.

But If I have a background picture like 1600x916 it makes scroll bars on screens that can´t run this resolution. I would instead just like, that the background image just centers and that no scroll bars appears

rossonerisAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
rossonerisConnect With a Mentor Author Commented:
made the background in the body - now it is ok
0
 
Ivo StoykovCommented:
try attached code

HTH

Ivo Stoykov
Sub setColor()
  Select Case Range("D" & ActiveCell.Row).Value
    Case "15 Days", "30 Days"
        Range("E" & ActiveCell.Row & ":F" & ActiveCell.Row).Select
    Case "45 Days", "60 Days"
        Range("E" & ActiveCell.Row & ":G" & ActiveCell.Row).Select
    Case "90 Days"
        Range("E" & ActiveCell.Row & ":H" & ActiveCell.Row).Select
    Case "120 Days"
        Range("E" & ActiveCell.Row & ":I" & ActiveCell.Row).Select
    Case "immidiate"
        Range("E" & ActiveCell.Row & ":J" & ActiveCell.Row).Select
  End Select
  With Selection.Interior
      .Pattern = xlSolid
      .PatternColorIndex = xlAutomatic
      .Color = 65535
      .TintAndShade = 0
      .PatternTintAndShade = 0
  End With
End Sub

Open in new window

0
 
Ivo StoykovCommented:
sorry wrong posting...
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rossonerisAuthor Commented:
And here is my html



<html>

<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>title</title>
</head>

<body>

<div id="wrapper">
<div id="menutv">menuv</div>
<div id="menuh">menuh</div>
<div id="content">content</div>

</div>


</body>

</html>
0
 
Gurvinder Pal SinghCommented:
try adding overflow:hidden to the #wrapper style

0
 
rossonerisAuthor Commented:
Have tried that - but it don´t fix it, because I have defined width/height and as long it fits to those px nothing is "cut off"
0
 
rossonerisAuthor Commented:
working
0
All Courses

From novice to tech pro — start learning today.