...

View Full Version : background images in ie6 - hopeless



mbatup
09-25-2007, 07:29 PM
Hi Guys,

At heart I'm a designer. Though I started out a company and now have to code my own websites, which isn't really my thing as you may see shortly!!

The problem I'm having is in ie6, the background image isn't showing when I refresh it pops back up (though it still has a gap at the top and bottom!). The site looks fine obviously in ff & ie7. I have looked everywhere and tried a few things but nothing seems to work!!

http://www.biastech.com/Perperitus_web/index.html - Please don't laugh at my code!!

Thank you in advance for your help.

Mark

effpeetee
09-25-2007, 08:59 PM
Friend.

The CSS should be in the <head> section.
You appear to have it after.
-------------------------------------------
Doctype
<html>
<head>
<title></title>
<style type="text/css">

CSS here

</style>

</head>
<body>

etc.
--------------------------------------------

There are a number (37) validation errors.
http://validator.w3.org/
Check here.

Frank

mbatup
09-25-2007, 11:09 PM
Hi Frank,

Thanks for your help but the CSS is within the head section.

Mark

garydarling
09-26-2007, 06:59 AM
I no longer have IE6, but I remember! Try this at the top of your css first:


* {margin:0; padding:0}

This should get rid of the gaps at the top and bottom of the page.

Try relocating the background image from your html into your css as a background image to your div #body_bg, and putting your css into a separate file that is referenced in your head section:


<link rel="stylesheet" type="text/css" href="http://www.biastech.com/Perperitus_web/mystyles.css" />

The browser will cache all the css, thus speeding up page transitions and reloads so the pop back is less noticeable.

Gary

mbatup
09-26-2007, 10:47 AM
Thanks Gary,

That does indeed help. However the bigger problem is the background not repeating itself in ie6. It's a fairly big problem as you can't read anything unless the image is behind the page!!

I'm stumped!!

ahallicks
09-26-2007, 05:20 PM
I don't see the problems in Firefox or IE6?

mbatup
09-26-2007, 05:24 PM
with a mixture of me changing bits and bobs and gary's suggestion I've fixed this.

I gave my background a height in ems and a min-height as 100% which seemed to be fine on all browsers.

Thanks guys.

effpeetee
09-26-2007, 09:36 PM
Thanks for your help but the CSS is within the head section.


Sorry about my earlier post.
I missed the line just before the <body> tag.

Glad you fixed it.

Regards,

Frank



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum