Page 1 of 1
HTML 4 background tiles
Posted: Mon Dec 02, 2002 11:05 pm
by Andrew_Baker
Okay, I've read the specs, and I still can't find the answer I'm looking for. I'll look for other on-line resources to help answer my question, but I figured I could probably get a quick answer here, too.
The Problem: I'm attempting to use a tiled background image on my website. I tried using the code <body background="vgwallpaper.gif"> but the tiles don't appear when I view it with a browser.
Moreover, the HTML 4 specs say that particular method has been deprecated and is being intentionally phased out in preference of style sheets. I'm fine with that, but I was unable to locate an alternative to that declaration within the style sheet docs.
Does anyone know how to do this so it will view properly in any browser? I'm not very familiar with ALT declarations either, but since I'm a regular Lynx user, I don't want to break my web site for people who are using a text-only browser.
Thank you.
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 4:22 am
by jelleghys
Hmmm, I'm not sure if I fully understand you, but here's what I would do: (You've probably already done it, but anyway)
- Check if the filenames are correct
- Check if the file is in the right directory
- You use stylesheets? Like css? Check this file (or in the style-tag in your html-file) for background code... Maybe you should just add this: body {background-image: rl('backimage.gif');}
- Maybe you should also check for UPPER and lower case... Sometimes this messes everything up.
About the browser thingy. IE and NS support the css body thing...
If you want an example, check this website I made for a friend of mine:
http://users.skynet.be/jeroenjanssens/
Check this file too:
http://users.skynet.be/jeroenjanssens/stylesheet.css
- Jelle
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 10:32 am
by Andrew_Baker
No, I'm NOT using style sheets. I'm using plain HTML. I may switch to style sheets, though, because this is not working. The funny thing is that I've seen other sites with virtually identical code... identical in the body reference... with working background tiles in my browser.
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 10:50 am
by Schol-R-LEA
Andrew_Baker wrote:
The Problem: I'm attempting to use a tiled background image on my website. I tried using the code <body background="vgwallpaper.gif">
I know that you've presumably checked already, but is this name suposed to be "vg
awallpaper.gif" by any chance? The little things are the easiest to miss, after all. You can stare right at them and not see them, sometimes. OTOH, it's just a guess, and probably wrong. I thought I'd mention it, though.
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 11:43 am
by 123abc
I have the perfect fix: you MUST save the file as a.html, that is, not .htm.
For some reson, .htm's won't work!
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 11:49 am
by Tim
Yes they will, if you have your browser set up correctly. Windows browsers will recognise both .htm and .html as HTML code by default.
I reckon the file name is wrong.
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 7:34 pm
by sonneveld
Considering Baker Man is cooking up a game called Voodoo Girl, I believe the filename is correct.
- Nick
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 7:49 pm
by 123abc
Just try saving it as a .html
please?
Re:HTML 4 background tiles
Posted: Tue Dec 03, 2002 7:58 pm
by Andrew_Baker
It is index.html... sorry, but that's not it. I also double-checked, and the file is named correctly. Maybe it's the gif format? Maybe it's the fact it was imported from Mac and I may have messed something up when porting it? (although it doesn't appear in Netscape Navigator 4.x for Mac, either)
Re:HTML 4 background tiles
Posted: Wed Dec 04, 2002 9:36 am
by jelleghys
Maybe it's the gif format?
Hmm, maybe, but then... you should try another pic, see if that works...
Re:HTML 4 background tiles
Posted: Wed Dec 04, 2002 10:30 am
by Andrew_Baker
Yep, I put it into Illustrator and then exported it as a jpg and it worked. I still don't know if it was because it was a gif or a Mac file, but I'll find out soon.
Re:HTML 4 background tiles
Posted: Fri Dec 06, 2002 5:44 pm
by detheavn
Could be that it has something to do with the CYMK and RGB color modes. Browsers truly dislike CYMK , and will show garbage IF showing anything at all.
Re:HTML 4 background tiles
Posted: Fri Dec 06, 2002 6:19 pm
by Andrew_Baker
Thank you. I converted it to JPEG in Adobe Illustrator, but I had to manually adjust the size of the image to get it to tile properly (HTML has built in paramaters for resizing foreground images, but not backgrounds for some bizarre reason), but the image turned out gigantic, even though I didn't change its size in Illustrator.
Any, check out
www.voodoogirl.cjb.net to see the net result of all of your advice.