Jump to content

Problems with images


Hard Klen

Recommended Posts

I'm new to HTML and CSS, so I might be doing some stupid mistake, but I can't get an image as background in CSS. I've tried everything I could come up with, but I can't make it... I'm doing as it says in the guide on W3school, but...And I've got problems with getting a image to show when it is from another folder than the one where I've saved my HTML- and CSS-documents. It works in Internett Explorer, but not in Firefox.Hope somebody can help me...PS: about CSS, I can change the background color, and those other CSS-things, so the problem is not that I can't link the CSS-document with the HTML-document

Link to comment
Share on other sites

If the image resides in the same folder that the webpage doesn, then all you need is this:

body{background-image:url('det_femte_ess.gif')}

There is no need to include "C:\Documents and Settings\Hard\Mine dokumenter\" since that is the absolute path to the file on your machine. Once you move your site to a web server, that will not be the location of the file and it will just show a red X and not load.

Link to comment
Share on other sites

I've tried that, but it dosen't work...

I think you are going to have to post a link to the page so that we can look exactly how it is coded. The little bit of code you offer doesn't seem to match the problem you are explaining. If you post a link we can review the rendered code and get to a solution much more quickly.Thanks
Link to comment
Share on other sites

I haven't posted the documents on the Internet yet, but I can give you the HTML and CSS documents if that'll help?

Please post it on the internet somewhere - nothing has to link to it and you can change the file name to protet the identity (lol). Its just easier to see and troubleshoot if the file is online - my environment is and will be different that yours.
Link to comment
Share on other sites

Hey, don't beat yourself up man. Since you're norwegian, you can try setting up an account on http://www.home.no/medlem/ny.cgi for free server space. It will only give you about 20Mb's of space, but it's enough for a small website. If you have any questions about its use, you can PM me, asking in English or Norwegian, whichever's easier to understand.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...