Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile backround image script?

    Hello all I'm a newbie at much of this stuff. If this is in the wrong section, or breaking the rules just let me know!

    My question is this: I had been using 10mb of space provided by my ISP, for a website. Recently an online game clan I'm in (yes at 42 yrs of age), started renting a larger server. They have offered 500MB on a Linux Debain, with cPanel server.

    When I write the html and load it, alls well. However, I can't seem to get the script write, to load a backround image?

    I tried this: <body background="images/dbh_page.jpg"> ; as that is the name of the JPG I'm using.

    Any suggestions? I have altered it a few different ways, without success? I've been trying to get this right, for 6 hours now, and am at me witts end.

    Thanks for your help in advance, Rick


  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's not how you load a background image.

    You should use CSS, place in <head>.

    <style type="text/css">
    body { background-image: url(images/dbh_page.jpg) }
    </style>



  • #3
    Regular Coder
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia, Canada
    Posts
    392
    Thanks
    1
    Thanked 0 Times in 0 Posts
    And that is not considered a script, heh, unless you want a random background image to be displayed.
    Once I thought I was wrong but I was mistaken.

  • #4
    New Coder
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the help I appreciate it. Rick

  • #5
    Registered User
    Join Date
    Oct 2004
    Posts
    592
    Thanks
    0
    Thanked 1 Time in 1 Post
    http://icebergz.flashband.net/myitlibrary/

    There , learn to read some that suits your need.

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    And if the code Mark posted didn't work, the problem could lie in that it is being case-sensitive in the filenames. Like MyImage.jpg isn't the same as myImage.jpg
    OracleGuy

  • #7
    New Coder
    Join Date
    Aug 2005
    Location
    Ohio
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Mark thanks for the info it's appreciated! I haven't learned anything about css? Someone lese mentioned a page, they thought I should look at r/t css.

    Trisitian - I just got into this two weeks ago, script, not script? I don't know it all. Actually probably very little, but this is all I have so far.

    www.dbhclan.org


    Iota - Thanks for the link I will check it out!

    Oracleguy - I made sure everything is matching in small case. What I have read, said for html everything should be in small caps???

    I'm basically doing this for a group of people I play a game with, online. We wanted to go php. As I read about it, it seemed if one can get a handle on html, php would come easier.

    Thanks for all the help!!!

    Rick

  • #8
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    technically for a bg it shouldn't be this:

    <style type="text/css">
    body { background-image: url(images/dbh_page.jpg) }
    </style>
    but this:

    Code:
    <style type="text/css">
    body { background-image: url('images/dbh_page.jpg')}
    </style>
    you do need to add the ' '

  • #9
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Not really. I never use quotes, and it's not defined anywhere that you need to.

  • #10
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yup, you shouldn't use quotes because some browsers will have trouble with it if you use them.

  • #11
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post

  • #12
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    w3schools doesn't set the standards w3c does. If you really want to get technical read the spec.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •