using image for background on index page?

Please support our Site Layout and Usability advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: May 2007
Posts: 1
Reputation: wasakonis is an unknown quantity at this point 
Solved Threads: 0
wasakonis wasakonis is offline Offline
Newbie Poster

using image for background on index page?

 
0
  #1
May 7th, 2007
I planned on using an image as the background on my index page but it only works in preview mode. It doesn't show up when i upload the files. I'd like to have the image cover the entire page and i'd add buttons to that. Shrinking the file way down doesn't help. I don't have a problem loading images for content or thumbnails. I've been offered suggestions elsewhere but nothing has worked so far. I'm not using css. I'm using a mac. Suggestions?
thanks
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: using image for background on index page?

 
0
  #2
May 8th, 2007
Several questions:

- Did you use relative addressing to point to the image? Or is the web page looking for it on your hard disk (where it can't be found by the ISP computer).

- Is the image in the same folder on the site, relative to the location of the index page, as it was in the test setup?

- Did you remember to make the image public on the ISP when you made the .htm files public?

- Are you exceeding the ISP maximum download size for a page?

- What type of image file is it?

- Is the image larger than the browser window? Some browsers refuse to display such images.

- Are you using the deprecated background="url" property inside the body tag? It was never fully implemented in all browsers. Use a style sheet instead.

- Did you forget to close a quote, or to put quotes around the url?

- Use one of the validator programs, and see if you forgot to close tags.

- Many ISPs are case-sensitive for filenames.

- Does the filename violate the ISP file-naming rules?

Sample rules for mainframe ISP file servers which are different than Windows or Mac names:

1. No spaces in the filename.
2. The first character must be alphabetic.
3. No more than 8 characters in a filename. (It will shorten it "for you").
4. No 4-character extensions (such as .jpeg).
5. No special characters other than the underscore.
6. Must be all-lowercase.

These are sample file-naming conventions. Find out what your ISP actually requires for a filename.
Last edited by MidiMagic; May 8th, 2007 at 1:45 am. Reason: syntax
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

Re: using image for background on index page?

 
0
  #3
Jun 12th, 2007
I have never done any web design on a mac but can't you just stick:
[code]
<style type="text/css">
body {
background-image: url(image/image.jpg);
}
</style>
[code]

just an idea. but obviously it is css.
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: using image for background on index page?

 
0
  #4
Jun 14th, 2007
Yes you can, if the image is in a folder called "image" which is inside the folder containing the web page.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

Re: using image for background on index page?

 
0
  #5
Jun 15th, 2007
Well you could just change that folder to whatever? you can obviously also link to a complete url from there.

  1. <style type="text/css">
  2. body {
  3. background-image: url(http://www.myimagehosting.com/image/image.jpg);
  4. }
  5. </style>

{just an example!}
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 37
Reputation: ¤| battousai |¤ is an unknown quantity at this point 
Solved Threads: 1
¤| battousai |¤ ¤| battousai |¤ is offline Offline
Light Poster

Re: using image for background on index page?

 
0
  #6
Jun 16th, 2007
well i think i have more or less the same problem.

i have made a picture to be displayed on the background of the entire site but it didn't work when i included the code in an external stylesheet.
It did however work as a global stylesheet, decleared in the header of the site.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

Re: using image for background on index page?

 
0
  #7
Jun 16th, 2007
It should work as an external stylesheet. You need to make sure that you are getting the correct url from the folder that your stylesheet is in not the page it is displaying on.
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 237
Reputation: macneato is an unknown quantity at this point 
Solved Threads: 20
macneato's Avatar
macneato macneato is offline Offline
Posting Whiz in Training

Re: using image for background on index page?

 
0
  #8
Jun 18th, 2007
Paste this in the head tags.
Remember ur image will wrap.
<!--
body {
background-image: url(images/urimage.gif);
}
-->
</style>
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 1,283
Reputation: roryt will become famous soon enough roryt will become famous soon enough 
Solved Threads: 14
roryt's Avatar
roryt roryt is offline Offline
Nearly a Posting Virtuoso

Re: using image for background on index page?

 
0
  #9
Jun 18th, 2007
It is a much better choice to do it in your external style sheet no in your head
PhotoShopthis
FlyingPen
If I have helped you please add to my reputation
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 165
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: using image for background on index page?

 
0
  #10
Jun 19th, 2007
Your image file descriptor must be designed to tell the stylesheet where the image file is from where the css file actually IS stored.

so if you have your html files in your top folder, with subfolders named css and images, you have to get from the css folder up to your top folder, and then down to the images folder. Like this:

url(../images/image.jpg)

the .. says go to the parent folder above the folder the file is in.

the /images says to go to the subfolder named 'images'.

the /image.jpg says to get the image file named 'image.jpg'.

Another way to specify it is:

url(/images/image.jpg)

The / as the first item in the url means to start at the root directory of your site.

the others are the same.
Last edited by MidiMagic; Jun 19th, 2007 at 5:00 am.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Site Layout and Usability Forum


Views: 3333 | Replies: 12
Thread Tools Search this Thread



Tag cloud for Site Layout and Usability
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC