2 replies [Last post]
Jip Jonker
Jip Jonker's picture
Offline
newbie
Last seen: 11 years 14 weeks ago
Timezone: GMT+2
Joined: 2004-09-09
Posts: 2
Points: 0

Hi!

I made a site that uses a stylesheet. In this stylesheet I use background images or div's and tables. The problem is that the images defined in the stylesheet are not cached in IE6. When I view the site in Navigator of Opera this problem does not occur.

beacause of this 'not-caching', everytime you open a new page on the site the images are downloaded again and not used from the cache.

This is the link to the site i'm working on: www.test.harwil.nl

This is the stylesheet used for the site I mentioned:

html, body {
height: 100% }

body {
margin: 0px;
padding:0px;
font-family: Trebuchet MS, Verdana, Arial;
font-size: 14px;
padding-right: 0px;
padding-left: 0px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #FFFFFF;
background-image: url(../images/harwil_body_back.jpg);
background-attachment: fixed;
background-repeat: repeat-x;
background-position: bottom;
}

.nav_table p {
line-height: 20px;
}
.nav_table a:link {
color: #000066;
}

.nav_table a:visited {
color: #000066;
}

.nav_table a:hover {
color: #FFFFFF;
background-color: #0043CE;
display: inline;
}

.geslaagdeimage {
border: thin outset #000066;
}
.quote {
font-style: italic;
color: #000066;
font-size: 12px;
}
.geslaagdetabelkop {
font-weight: bold;
color: #000000;
font-size: 11px;
}
.geslaagdetabelwaarde {
font-weight: normal;
color: #990000;
font-size: 11px;
}
.kop1 {
color: #FF0000;
font-weight: bold;
display: block;
padding: 2px;
border-bottom: thin solid #666666;
}
p {
margin: 2px;
padding: 2px;
}

.webtable {
background-color: #FFFFCC;
background-image: url(../images/webhoofd.jpg);
background-repeat: no-repeat;
}

.nav_table {
background-image: url(../images/nav_gr.gif);
background-repeat: repeat-x;
background-position: bottom;
border: thin dashed #FF0000;
margin: 10px;
}
.maintable {
margin-top: 15px;
}
.leerling_table {
margin-top: 5px;
background-attachment: fixed;
background-image: url(../images/nav_bl.gif);
background-repeat: repeat-x;
background-position: left top;
margin-right: 8px;
border: thin dashed #000066;
}
.linkactief {
color: #FFFFFF;
}

Is this a IE6 problem? A CSS problem? Does anyone have any suggestions?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 week 6 days ago
Joined: 2004-06-30
Posts: 9679
Points: 815

No caching of images (from stylesheet) in IE6

I have no idea about the image problem, but you might want to try cleaning up your CSS. Example:

body {
margin: 0px;
padding:0px;
font-family: Trebuchet MS, Verdana, Arial;
font-size: 14px;
padding-right: 0px;
padding-left: 0px;
padding-top: 0px;
padding-bottom: 0px;
background-color: #FFFFFF;
background-image: url(../images/harwil_body_back.jpg);
background-attachment: fixed;
background-repeat: repeat-x;
background-position: bottom; 

Can be just as easily replaced with

Quote:

body {
margin: 0px;
padding:0px;
font: 14px Trebuchet MS, Verdana, Arial, sans-serif;
background: url(../images/harwil_body_back.jpg); repeat-x fixed bottom #fff;

Verschwindende wrote:
  • CSS doesn't make pies

Jip Jonker
Jip Jonker's picture
Offline
newbie
Last seen: 11 years 14 weeks ago
Timezone: GMT+2
Joined: 2004-09-09
Posts: 2
Points: 0

No caching of images (from stylesheet) in IE6

Thanks for the tip! In the mean time my problems seems solved. At least, I know what the problem is. It seems that the images were not cached by IE6 because they were on a subdomain.

I don't know why, but when I moved the files to the domain itself the problem was solved and the images where cached. I mailed my provider to ask them if they knew the reason why this happened, but no response yet...