|
Posted by Els on 07/12/06 09:16
Steve Pugh wrote:
> Els wrote:
>
>> I just discovered something weird in IE with some of my pages, and I
>> can't figure out what could be wrong.
>>
>> I've got this page on my host's server:
>> http://locusmeus.com/test/thumbswraptest.html
>> And an exact copy of it locally:
>> http://here.locusmeus.com/test/thumbswraptest.html
>>
>> In my IE6 under WinXP, the local copy shows the same as in Firefox,
>> i.e. lightgreen and lightyellow backgrounds behind thumbnails and
>> captions.
>> The online copy however, shows these backgrounds as red, which I have
>> in there to debug - it's not supposed to show, and it doesn't in the
>> local version, nor in the online version in Firefox or Opera.
>
> Doesn't seem to be a server issue. Seems to be an IE bug in applying
> CSS to visited links. I bet that you clicked on a link on the online
> copy but not the local copy.
Didn't really click them, but yes, the online version's linked page is
in my cache, while the local one wasn't.
> When first loaded both versions (but am I actually see different copies
> from here?)
Of course :-)
locusmeus.com is in the USA, here.locusmeus.com right here on my pc,
in Hoogvliet (in the Netherlands)
> look the same in IE6. However, when I click a link and then
> go back, the links now have a red background. This does not happen in
> Opera.
>
> It seems to me that IE is applying the
> a:visited {
> background:red; /* for debugging purpose */
> }
> in preference to the
> span.thumb a{
> background:#90EE90; /* lightgreen */
> }
> and
> span.caption a{
> background:#FFFFE0; /* lightyellow */
> }
> rules.
Ah! Now there's a thought - why didn't I think of that! :-)
I've now set the background colors explicitly for a:link and
a:visited, and that does indeed make a difference:
http://locusmeus.com/test/thumbswraptest2.html
http://here.locusmeus.com/test/thumbswraptest2.html
> In general I would apply colours to a:link and a:visited and only use
> pseudo-class-less a selectors for things like display: block and
> margins.
Yes, I normally do actually - probably why I never saw this problem
before.
Thanks for seeing what I didn't :-)
--
Els http://locusmeus.com/
Navigation:
[Reply to this message]
|