Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:09:03+00:00 2026-05-25T03:09:03+00:00

I’m using a LAMP installation to create some personal sites. I just can’t understand

  • 0

I’m using a LAMP installation to create some personal sites.
I just can’t understand why i won’t be able to put a background image in the body section of my site.

Either if I use css or simple HTML when i try to put an image as background the result will be a blank page, or colored if I set a background color.

<body background="./image.jpg"> 

    <p>hello</p> 

</body>

or

index.html:

<head> 

     <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> 

</head>

<body> 

    <p>hello</p> 

</body>

style.css:

body { 
    background-color: #FFFFCC;
    background-image: url(./image.jpg); 
    background-attachment: fixed; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px; 
    color: #787878; 
}

Any ideas on what i could be doing wrong?

Maybe there’s some kind of module to activate in order to visualize images?

Any help will be very appreciated!!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:09:04+00:00Added an answer on May 25, 2026 at 3:09 am

    Tips for debugging and other info, which should hopefully lead you to the correct answer:

    • Check to see if you can see the image directly in your web browser. If the path you’re using to the HTML file is, for example, “http://example.com/some/dir/index.html”, then browse directly to “http://example.com/some/dir/image.jpg” and see if the image appears. If it doesn’t, then your image is inaccessible, or in the wrong place, or possibly corrupt or being served with the wrong Content-Type.

    • If the image is in the right place but seems inaccessible, check the file permissions first. The file should be readable by the web server. If in doubt, give it the same ownership and permissions as the HTML file you’re successfully reading. (On Windows, view the properties/permissions of the file and allow everyone to read it. On Unix, try chmod 644 <filename>.)

    • Consider the possibility that the image might actually be working fine, but also be a single pixel, or completely transparent, or a plain colour the same as its background, or positioned out of sight with the CSS positioning attributes.

    • Try temporarily using another image, preferably one you can definitely see on the web in the web browser you’re using for testing, downloaded with that browser (that will make sure there are no weird problems with the image file itself.)

    • Remember that if you’re defining the background in a CSS file, the path to the image is relative to that CSS file, not to the HTML file.

    • The “background” attribute is deprecated in HTML. If you want to specify a background inline in the HTML, try <body style="background-image: url(image.jpg);" >...</body>. But the proper place for this would be in the CSS these days.

    • You don’t need “./” in front of your image location. If it’s in the same directory as your HTML file, just use the name of the image, e.g. <body style="background-image: url(image.jpg);">

    • Does it work as a plain image? <img src="background.jpg"/>

    • Sanity-check your HTML by using a very simple, valid test document, like this one:

        <!DOCTYPE html>
        <html>
        <head>
            <title>Test</title>
        </head>
        <body style="background-image: url(http://placehold.it/350x150);">
            This is a test.
        </body>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have just tried to save a simple *.rtf file with some websites and
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.