Background image code - Need help

Discussion in 'HTML & Website Design' started by elialfgey, Aug 15, 2010.

  1. #1
    Hi,

    I knew that html code which I can put in notepad and change Background color.

    Now my question is How I will put some big image / photo in background in any website.

    Please tell me the code. Waiting for your reply.

    Thanks in advance.
     
    elialfgey, Aug 15, 2010 IP
  2. coolfriend

    coolfriend Peon

    Messages:
    391
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    body {background-image:url to the image;}
     
    coolfriend, Aug 15, 2010 IP
  3. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Wrong @coolfriend

    It should be

    
    body {background-image: url('/path/to/image');}
    
    Code (markup):
     
    CSM, Aug 15, 2010 IP
  4. axm

    axm Active Member

    Messages:
    137
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    85
    #4
    R u using HTML? As everyone is posting you the codesof CSS.
    For HTML

    <body background="source of bg"></body>
     
    axm, Aug 15, 2010 IP
  5. ksb

    ksb Well-Known Member

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    170
    #5
    fight "axm"... is the the actual code of HTML.
     
    ksb, Aug 16, 2010 IP
  6. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #6
    I would not recommend inline CSS in any site.
    It's better to have an external CSS file (compressed/gzipped).
     
    CSM, Aug 16, 2010 IP
  7. sakib25

    sakib25 Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    what is the background image code?
     
    sakib25, Aug 16, 2010 IP