+ Reply to Thread
Results 1 to 7 of 7

Thread: [HELP]How to add a background

  1. #1
    Derek is offline Community Support Force Derek is a splendid one to beholdDerek is a splendid one to behold
    Join Date
    May 2005
    Location
    cossacks
    Posts
    6,354

    [HELP]How to add a background

    How do I add this http://collide.elementfx.com/index.html I mean that is my site I mean how do I add this background http://www.collide.elementfx.com/bakground.PNG to my home enter page.

  2. #2
    bigguy's Avatar
    bigguy is offline Retired bigguy is an unknown quantity at this point
    Join Date
    Mar 2005
    Location
    Canada
    Posts
    5,426

    Re: [HELP]How to add a background

    You could do it through your style.css file. (If you have one)
    Last edited by bigguy; 05-24-2007 at 01:07 AM.
    P.C. Tweakr - For all your computer and internet support
    P.C. Tweakr - For all your SMF help and support

  3. #3
    Dub_Dude is offline x10 Sophmore Dub_Dude is an unknown quantity at this point
    Join Date
    Sep 2005
    Posts
    172

    Re: [HELP]How to add a background

    for CSS: background-image: url("route/to/image")

    for html: <body background="route/to/image">

  4. #4
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: [HELP]How to add a background

    HTML Code:
    <style type="text/css">
    body{
    background-image: url("url/to/image");
    background-repeat: none; /* Important so that background doesnt repeat itself */
    }
    </style>
    Last edited by Chris Z; 05-24-2007 at 08:09 AM.
    Regards,
    Zenax

  5. #5
    unpixelatedgamers's Avatar
    unpixelatedgamers is offline x10 Lieutenant unpixelatedgamers is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Nottingham (England)
    Posts
    337

    Lightbulb Re: [HELP]How to add a background

    There are a few ways to do it (as with all programming).

    From your code it looks like you've already tried to do it here:
    HTML Code:
    </script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a></noscript></center>
    <STYLE TYPE="text/css">p {align=justify}
    BODY{cursor: url(http://www.geocities.com/ang3lbabi3_x3/derek.ani);}
    a {cursor: url(http://www.geocities.com/ang3lbabi3_x3/derek.ani);}
    BODY BACKGROUND="http://www.collide.elementfx.com/bakground.PNG"
    </STYLE>
    <title>Welcome to Derek's Site!</title>
    But your style is outside your "head" tags. So with most browsers it won't work, or it will act funky.

    You've also seem to have two title tags, and your <html> tag is well below the start of your code. It should be almost right at the top. Only usually preceded by a doctype declaration.

    First Method

    That bit should look something like this:
    HTML Code:
    <head>
      <title>Welcome to Derek's Site!</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <STYLE TYPE="text/css">
    body {
    background-image:bakground.PNG;
    background-repeat:no-repeat;
    }
    </style>
    </head>
    Second Method

    Alternately, you can just add a background attribute to your body tag.
    So, this:
    HTML Code:
    </head>
    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!-- ImageReady Slices (enter.png) -->
    Would become this:
    HTML Code:
    </head>
    <body background="bakground.PNG" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!-- ImageReady Slices (enter.png) -->
    Third Method

    One final way to do it (that I know of) is to use an external stylesheet.
    Add this inside your head tags:
    HTML Code:
    <link rel="stylesheet" href="mainstyle.css" type="text/css" />
    Then create a file in your main directory with whatever filename you put inside the "href." In this case "mainstyle.css." Then add the following code to it:
    HTML Code:
    /* CSS Document */
    body {
    background-image:bakground.PNG;
    background-repeat:no-repeat;
    }
    This is essentially the same as the first method, but instead of doing it inside the document, it farms out the work to a separate file. Which means you can use the same stylesheet across many pages. Without having to retype the whole code all the time.

    Now, 3 ways to do it. Which one to choose?

    Oh, sorry for snooping your code, if your worried about that sort of thing.
    Ignorance is the true enemy of all things.

  6. #6
    Derek is offline Community Support Force Derek is a splendid one to beholdDerek is a splendid one to behold
    Join Date
    May 2005
    Location
    cossacks
    Posts
    6,354

    Re: [HELP]How to add a background

    Perfect the
    </head>
    <body background="bakground.PNG" bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <!-- ImageReady Slices (enter.png) -->
    Worked Perfectly..

  7. #7
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: [HELP]How to add a background

    Code:
    /* CSS Document */
    body {
    background-image: url(background.PNG);
    background-repeat:no-repeat;
    }
    You forgot to add the url(background.png) to the code.
    Last edited by Zenax; 05-25-2007 at 06:57 AM.
    Regards,
    Zenax

+ Reply to Thread

Similar Threads

  1. August: Current Background
    By Chris S in forum Off Topic
    Replies: 4
    Last Post: 08-09-2006, 09:02 PM
  2. Bid For Multiple Background Dynamic SIG
    By iubtalks in forum The Marketplace
    Replies: 32
    Last Post: 08-05-2006, 01:28 PM
  3. My web designe
    By dharmil in forum Graphics & Webdesign
    Replies: 7
    Last Post: 07-20-2006, 09:23 AM
  4. need background wallpaper
    By IamShipon1988 in forum The Marketplace
    Replies: 6
    Last Post: 10-18-2005, 07:34 PM
  5. Background Help!
    By Akkarin in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 06-03-2005, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers