Hi all, I have tried everything, image re-size, background: fixed - but my site http://www.StandoutModels.com has a horizontal issue with monitor sizes over 18 inches wide. Anything over that and the image starts repeating itself. How can I possibly get a fix for this? I thought with background: fixed that there'd be no horizontal scrollbar at all - even if there wasn't, there's still the problem of overlapping - please help ",)
You this html, body {       height: 100%;     text-align: center; } change html, body {     background-position: center top;     background-repeat: no-repeat;     height: 100%;     text-align: center; } and <body style="background: url("img") no-repeat scroll center top ;"
Hi msm2010, thanks for the reply. That centres all the pages but doesn't stretch them across to meet the bigger browser and there's still a horizontal scroller on smaller monitors? Any other suggestions? Also, the homepage is a slideshow and that won't work with this, any suggestions there please?
Come on I'll do it. So it will be faster. Or write specifically as it should be. Or let me see a pattern will set you as you want.
Thank you: css file: * { margin: 0; padding: 0; } img { border: 0; } ul, li { list-style: square; } html, body { height: 100%; text-align: center; overflow: -moz-scrollbars-vertical; overflow-x: hidden; } #topbar { margin-top: 30px; height: 40px; width: 100%; border-style:solid; border-color:white; border-width: 1px; border-left-width: 0px; background-color: black; } #details { opacity:1; background-color: black; color:white; width: 800px; margin: 0 auto; margin-top: 100px; filter: alpha(opacity=60); border-style:solid; border-color:white; border-width: 1px; font-family: tahoma; font-size: 11px; text-decoration: none; } .toptable { text-align: center; } .imagebar { position: absolute; top:15px; left:40px; border-style:solid; border-color:white; border-width: 1px; } #container { width: 2205px; /*silly width, not 800-friendly yet still small on the next screensize up... might as well go to 960 or something*/ margin: 0 auto; } * html #container {height: 40px;} /*no min-height for lte IE6*/ #header { position:relative; z-index:99; width:100%; } h1 { color: #fff; height: 25px; width: 849px; position: relative; } h1 span { position: absolute; width: 100%; height: 100%; left: 0; top: 0; background: url(logof.jpg) 0 0 no-repeat; } #menu1 { #0ED1E8 background-color: black; width: 100%; /*haslayout so background colour shows in IE6*/ margin-left:350px; margin-top:7px; overflow: hidden; } #header ul li { display: inline; /*some declaration for IE7, otherwise ignore li's*/ z-index:1000 } #menu11 { border-top: 1px solid #949494; background-color: #37383d; width: 100%; /*haslayout so background colour shows in IE6*/ overflow: hidden; list-style-type: square; } #header ul a, #header p { float: left; font-family: tahoma; font-size: 11px; color: #e0e4e7; height: 26px; line-height: 26px; text-align: center; text-decoration: none; padding: 0 10px; } #header ul a:focus, #header ul a:hover { color: black; background-color: #0ED1E8; } * html #header p {margin-right: -3px;} /*stoopid 3-pixel-jog bug*/ #menu2, #footer { background-color: #6B6565; color: #e0e4e7; overflow: hidden; border-top: 1px solid #949494; border-bottom: 1px solid #b9c0ca; } * html #menu2 {height: 1.4em;} /*haslayout so the background shows in IE6*/ #flash { background-color: #949494; color: #000; padding-top: 1px; margin-top: 0px; position:relative; z-index:1; } #footer { margin-left: 0; padding: 0 5px; border-top: 1px solid #b9c0ca; border-bottom: 1px solid #b9c0ca; font-family: tahoma; font-size: 11px; padding: 5px; text-align: left; } #footer p { background-color: blue; } #menuh { background-color: #6C7079; border-top: 1px solid #B9C0CA; border-bottom: 1px solid #B9C0CA; color: #626B7E; float:left; width:100%; } #menuh li { list-style: square; position: relative; float: left; } #menuh a { float: left; padding: 0 1em; color: #FFFFFF; text-decoration: none; } #menuh a:hover { background-color: #37383D; } #menuh div{ padding:5px 0 0 0; position: absolute; top: 24px; width:108px; left: -999em; background:url(fake.gif) no-repeat 0 0;/* use a 1px x 1px transparent gif*/ } #menuh div ul { background-color: #6C7079; border: 1px solid #B9C0CA; width: 100px; padding: 0 4px; float:left; } #menuh ul li { width: 100px; padding:4px 0; border-bottom: 1px solid #B9C0CA; } #menuh ul li.last { border-bottom: 0; } #menuh ul a { padding: 0 4px 0 5px; text-align: left; float: none; display: block; line-height:1.2em!important; height:auto!important } #menuh li:hover div, #menuh li.sfhover div { left: 0px; } Code (markup): Index.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="keywords" content="standout models, models, model agency, standoutmodels"> <title>Welcome to Standout Models - StandoutModels.com</title> <meta name="title" content="Standout Models"> <meta name="description" content="Standout Models"> <meta name="author" content="Standout Models" /> <meta name="robots" content="FOLLOW, INDEX"/> <meta name="copyright" content="A1Status"> <link href="models.css" rel="stylesheet" type="text/css" /> <style> A:link { COLOR: white; TEXT-DECORATION: none } A:active { COLOR: white; TEXT-DECORATION: none } A:visited { COLOR: white; TEXT-DECORATION: none } A:hover { COLOR: white; TEXT-DECORATION: underline } </style> <script language="JavaScript1.2"> //Background Image Slideshow- © Dynamic Drive (www.dynamicdrive.com) //For full source code, 100's more DHTML scripts, and TOS, //visit http://www.dynamicdrive.com //Specify background images to slide var bgslides=new Array() bgslides[0]="1.jpg" bgslides[1]="2.jpg" bgslides[2]="4.jpg" bgslides[3]="6.jpg" bgslides[4]="5.jpg" bgslides[5]="10.jpg" //Specify interval between slide (in miliseconds) var speed=2500 //preload images var processed=new Array() for (i=0;i<bgslides.length;i++){ processed[i]=new Image() processed[i].src=bgslides[i] } var inc=-1 function slideback(){ if (inc<bgslides.length-1) inc++ else inc=0 document.body.background=processed[inc].src } if (document.all||document.getElementById) window.onload=new Function('setInterval("slideback()",speed)') </script> </head> <body background="10.jpg"> <div id="topbar"> <img src="pix1.jpg" class="imagebar"> <div id="header"> <ul id="menu1"> <li><a href="index.php">HOMEPAGE</a></li> <li><a href="talent.php">BROWSE TALENT</a></li> <li><a href="team.php">OUR TEAM</a></li> <li><a href="model.php">BECOME A MODEL</a></li> <li><a href="news.php">PRESS RELEASES</a></li> <li><a href="contact.php">CONTACT US</a></li> </ul> </span> </div> PHP: talent.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="keywords" content="standout models, models, model agency, standoutmodels"> <title>Welcome to Standout Models - StandoutModels.com</title> <meta name="title" content="Standout Models"> <meta name="description" content="Standout Models"> <meta name="author" content="Standout Models" /> <meta name="robots" content="FOLLOW, INDEX"/> <meta name="copyright" content="A1Status"> <link href="models.css" rel="stylesheet" type="text/css" /> <style> A:link { COLOR: white; TEXT-DECORATION: none } A:active { COLOR: white; TEXT-DECORATION: none } A:visited { COLOR: white; TEXT-DECORATION: none } A:hover { COLOR: #0ED1E8; TEXT-DECORATION: underline } </style> </head> <body style="background: url(11.jpg) no-repeat scroll center top ; background-attachment: fixed;"> <div id="topbar"> <img src="pix1.jpg" class="imagebar"> <div id="header"> <ul id="menu1"> <li><a href="index.php">HOMEPAGE</a></li> <li><a href="talent.php">BROWSE TALENT</a></li> <li><a href="team.php">OUR TEAM</a></li> <li><a href="model.php">BECOME A MODEL</a></li> <li><a href="news.php">PRESS RELEASES</a></li> <li><a href="contact.php">CONTACT US</a></li> </ul> </span> </div> <div id="details"> <br> <table align="center" width=100%> <tr> <td> <a href="amy.php"><img src="models/2.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="amy.php">Amy</a></span> </td> <td> <a href="me.php"><img src="models/11.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="me.php">Leo</a></span> </td> <td> <a href="aggie.php"><img src="models/4.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="aggie.php">Aggie</a></span> </td> <td> <a href="grace.php"><img src="models/7.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="grace.php">Grace</a></span> </td> </tr> <tr> <td> <br> <a href="egle.php"><img src="models/3.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="egle.php">Egle</a></span> </td> <td> <br> <a href="sarah.php"><img src="models/8.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="sarah.php">Sarah</a></span> </td> <td> <br> <a href="nic.php"><img src="thumbs/6.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="nic.php">Nicolle</a></span> </td> <td> <br> <a href="dam.php"><img src="models/5.jpg"></a> <br> <span style="font-size: 15px; font-family: tahoma; color: #0ED1E8"><a href="dam.php">Damien</a></span> </td> </tr> </table> <br> </div> </div> PHP:
Basically, I would like the background to extend across the screen regardless of monitor or resolution size.
If you zoom out on your browser - you will see the site's background images repeat themselves or there is white either side of them.
delete of body (style="background: url("11.jpg") no-repeat fixed center top transparent;") lower body put <style type="text/css"> <!-- Â Â Â Â .fon_img { Â Â Â Â position: fixed; top: 0; left: 0; z-index: 1; width: 100%; Â Â Â Â } .content { position: absolute; left: 0; top: 0; z-index: 5; } --> </style> Â <img id="fon_img" class="fon_img" src="you_img" /> <div class="content"> Â Â <!--ALL content web site --> Â Â <div id="topbar"> Â Â ........ ....... ...... </div> </div> and modify js to change the image and not the background.
Hi msm2010, thanks for your work but it didn't really work. The navbar won't extend to the end of the screen now and the main div content isn't centred on the page. The JS slides images not a background image so if you can get to work then that should work too. Thanks for your efforts Please see: http://www.standoutmodels.com/talent.php
in the sense of not working? change js minute. well as how to align the content is not a problem. what is the actual difficulties. it was necessary to create one background image on the whole page - I have done.
Please view: http://www.standoutmodels.com/talent.php and scroll to the right, that is the problem :/