Background image

Discussion in 'HTML & Website Design' started by hitman95, Feb 5, 2010.

  1. #1
    Hey guys can someone tell me how to put a background image on my website.
    I need to upload it?
    Can you give me html code and instructions what to do.
     
    hitman95, Feb 5, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    s_ruben, Feb 5, 2010 IP
  3. vinylsearcher

    vinylsearcher Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    body style="background-image:url('/images/image1.gif')">
     
    vinylsearcher, Feb 5, 2010 IP
  4. LeetPCUser

    LeetPCUser Peon

    Messages:
    711
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can do that or you can assign it to a CSS class.

    
    .backgroundClass
    {
     background:url("images/yourImage.jpg") no-repeat;
     height:40px;
     width:90px;
    }
    
    Code (markup):
     
    LeetPCUser, Feb 5, 2010 IP
  5. nadiralishah_webexpert

    nadiralishah_webexpert Guest

    Messages:
    229
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    very simple you can put on body tag, like <body background="image path">
     
    nadiralishah_webexpert, Feb 5, 2010 IP
  6. TimothyJohn

    TimothyJohn Member

    Messages:
    786
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #6
    This is the best of all the provided answers. When coding background images never use html. It is old and was not designed to make things look pretty. Look into using CSS to apply a background. If you do not understand CSS perhapd goto w3schools and read up on it :) w3schools can be found on google. Good luck with your site!
     
    TimothyJohn, Feb 5, 2010 IP
  7. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Do not use <body style> or <body background>.
    Use something like thisin CSS:
    body{background:url('/images/background.png') no-repeat;}
     
    krsix, Feb 5, 2010 IP
  8. hitman95

    hitman95 Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    hitman95, Feb 5, 2010 IP
  9. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Please don't use that. It's deprecated, and probably won't (IIRC) validate for HTML4.01 and XHTML.
     
    krsix, Feb 5, 2010 IP
  10. tech_savvy

    tech_savvy Peon

    Messages:
    435
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    i use the design view of dreamweaver to place my background image.
     
    tech_savvy, Feb 5, 2010 IP