OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 1:41 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: HTML 4 background tiles
PostPosted: Mon Dec 02, 2002 11:05 pm 
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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 4:22 am 
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


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 10:32 am 
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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 10:50 am 
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 "vgawallpaper.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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 11:43 am 
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!


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 11:49 am 
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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 7:34 pm 
Considering Baker Man is cooking up a game called Voodoo Girl, I believe the filename is correct.

- Nick


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 7:49 pm 
Just try saving it as a .html

please?


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Tue Dec 03, 2002 7:58 pm 
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)


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Wed Dec 04, 2002 9:36 am 
Quote:
Maybe it's the gif format?


Hmm, maybe, but then... you should try another pic, see if that works...


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Wed Dec 04, 2002 10:30 am 
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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Fri Dec 06, 2002 5:44 pm 
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.


Top
  
 
 Post subject: Re:HTML 4 background tiles
PostPosted: Fri Dec 06, 2002 6:19 pm 
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.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 89 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group