I've made a simplified version of the problem I'm having (code below.)
Basically, I want to have a repeating texture for the main page background, but with a wide white strip going down the middle (in this case as the background of a wrapper div.) When I try this (as below) however, it works fine until there is enough content (or the browser window is short enouh) that the page scrolls in which case the white strip dissapears under content scrolled into view.
Any ideas?
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>background test</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style type="text/css"> html, body { margin: 0; padding: 0; height: 100%; } body { background: #ccc url(bg.jpg); } #wrapper { width: 758px; height: 100%; margin: 0 auto; background: #fff; } #content { height: 400px; width: 400px; border: 1px dotted #900; } </style> </head> <body> <div id="wrapper"> <div id="content"> make browser window shorter than this box to scroll </div> </div> </body> </html>






Bookmarks