My background image does not appear in some browsers?

Discussion in 'HTML & Website Design' started by kaya, Nov 27, 2011.

  1. #1
    Hello, Im new in this HTML business and need a little help for my homework =)
    So I must create this portfolio site for myself...I created a background at photoshop and placed it there (jpg, 1152x650, 221KB) I also designed a few buttons and linked them through my other two pages.Everything went fine on my laptop Firefox untill I tried having a peek with IE/Safari/Chrome.My background was gone, buttons were there but the real background image was nowhere to be seen. Panicking, I rushed to a nearby PC and shocked to see that NOT EVEN FIREFOX (and the rest) managed to open my background image.So Im pretty much screwed since we will be presenting it on a common class PC.

    Here is my codings, please for the love of god some experts take a look at it and help me fixing my mistake :p


    Thank you so much! ^^
     
    kaya, Nov 27, 2011 IP
  2. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #2
    surely the body tag should be <body background="background.jpg">?

    I see you are referencing divs for the buttons but have no styles for them?
     
    Toycel, Nov 27, 2011 IP
  3. burminsky_pv

    burminsky_pv Peon

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    <body style="background: url(your_directory_with_images/main.jpg) no-repeat top;">
    Code (markup):
    Why are you don't want to use css?
     
    burminsky_pv, Nov 28, 2011 IP
  4. xira

    xira Active Member

    Messages:
    315
    Likes Received:
    8
    Best Answers:
    4
    Trophy Points:
    68
    #4
    Another word here (besides what was written up top) you're not closing your tags. All DIVs need an start and end tag. You have at least two DIVs with only a start tag.
     
    xira, Nov 28, 2011 IP
  5. bryanbell

    bryanbell Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I thought you should use CSS for background image as well as for style your website
     
    bryanbell, Nov 28, 2011 IP
  6. Feelme@alone

    Feelme@alone Active Member

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6
    should be the image css in body tag
     
    Feelme@alone, Nov 30, 2011 IP
  7. Yasinepd

    Yasinepd Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    <body background="background.jpg"> should be ?
     
    Yasinepd, Nov 30, 2011 IP