Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: background problem  (Read 3070 times)

0 Members and 1 Guest are viewing this topic.

rockstar4cs

    Topic Starter


    Intermediate

    background problem
    « on: October 18, 2008, 06:41:54 PM »
    I used repeat Y scroll with a background I made problem is it works but 1/3 of the page on the right side of the web page is white. Why isnt the repeat Y covering the entire page I realize my coding is sloppy but I'm new could somone tell me why the repeat Y code isnt coving the entire page with the background I put in?
    I underlined where I put in the repeat y scroll any help would be great thank you.




    Code: [Select]
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <script type="text/javascript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <table align="center" height="700px" width="1050px" border="1" cellpadding="0" cellspacing="0"/>
    <tr>
    <td align="center" valign="top"><img src="logo.jpg" alt="logo" height="130px" width="440px"></td>
    </tr>
    <tr>
    <td>
    [<body  style="color: rgb(82,64,0); background: white url(bar.jpg) repeat-y"onload="MM_preloadImages('bulb.jpg')">
    <table align="right" border="1" height="700px" width="865px"
    </td>
    <td align="left">CHRIS</td>
    </tr>
    </table>





    <table align="left" border="5" background="side.jpg"  height="900px" width="170px" cellpadding="5" cellspacing="0"/>
    <tr>
    <td align="center" valign="top"/>
    <form method="link"  action="about.html">
    <input type="submit" name="about" value="About Us"  style="width: 157px; height: 40px" />
    </form>
    <br/>
    <form method="link"  action="home.html">
    <input type="submit" name="home" value="Home"style="width: 157px; height: 40px" alt="Home Page"/>
    </form>
    <br/>
    <form method="link"  action="email.html">
    <input type="submit"  name="email" value="Email"style="width: 157px; height: 40px"/>
    </form>
    <br/>
    <form method="link"  action="rates.html">
    <input type="submit" name="Rates" value="Rates"style="width: 157px; height: 40px"/>
    </form>
    <br/>
    <form method="link"  action="pictures.html">
    <input type="submit" name="Photo" Value="Photos"style="width: 157px; height: 40px"/>
    </form>
    <br/>
    <form method="link"  action="indoor.html">
    <input type="submit" name="indoor" value="Indoor Jobs"style="width: 157px; height: 40px"/>
    </form>
    <br/>
    <form method="link" action="outdoor.html">
    <input type="submit" name="outdoor" value="Outdoor Jobs"style="width: 157px; height: 40px"/>
    </form>
    <tr>
    <td>
    <p align="center"
      <a href="example.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('bulb','','bulb.jpg',1)"><img src="bulb1.jpg" name="bulb" width="124" height="125" border="0" id="bulb" /></a></td>
    </p>
    </tr>
    </tr>
    </table>


    </td>
    </tr>
    </td>
    </td>

    </table>



    </table>
    </body>

    </html>


    ChrisXPPro



      Adviser

    • Forever Learning
    • Thanked: 4
      • ACB Systems
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows XP
    Re: background problem
    « Reply #1 on: October 18, 2008, 06:47:36 PM »
    Looks like some Dreamweaver code in there - anyways - you need to apply an ''x'' parameter to your background - plus maybe using a fixed width and tailoring your bg image to suit.

    In css for instance in your body setup you might have....

    Code: [Select]
    background:url(images/bg3.jpg) repeat-x top center #ffffff;
    Or something similar depending how you want your bg to behave.  You can set up both x and y in your css.

    I can't actually spot the code you refer to at a quick glance.
    Ain't technology great - until it goes wrong!