CSS present in DOM but not applied

F

Flintstone

There are 3 or 4 places I could have posted this but I think this
group is the most likely to come up with a solution.

I have a web app written in ASP.NET with an external stylesheet which
is actually an aspx file. Normally the page loads fine and all styles
are applied correctly but I have discovered a weird IE only problem.

1) Copy some text from the web page
2) Paste the text into Word
3) Close the web page and open it again.

Magically all my CSS styles vanish. The strangest thing is that if I
look at the DOM in IEs Web Developer Toolbar all of the colors, styles
etc from the stylesheet are present but for some reason they are not
applied.

I have tried setting the stylesheet to disabled
(document.styleSheet[0].disabled=true) and then enabling it again but
that seems to make no difference.

Pressing F5 fixes the page but I really need a more permanent fix.

Does anybody have and idea why this happens or what I could do about
it?
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Flintstone
There are 3 or 4 places I could have posted this but I think this
group is the most likely to come up with a solution.

I have a web app written in ASP.NET with an external stylesheet which
is actually an aspx file. Normally the page loads fine and all styles
are applied correctly but I have discovered a weird IE only problem.

1) Copy some text from the web page
2) Paste the text into Word
3) Close the web page and open it again.

Magically all my CSS styles vanish. The strangest thing is that if I
look at the DOM in IEs Web Developer Toolbar all of the colors, styles
etc from the stylesheet are present but for some reason they are not
applied.

I have tried setting the stylesheet to disabled
(document.styleSheet[0].disabled=true) and then enabling it again but
that seems to make no difference.

Pressing F5 fixes the page but I really need a more permanent fix.

Does anybody have and idea why this happens or what I could do about
it?

URL? Does this only happen in IE? Does this only happen on your
system, and what OS?
 
F

Flintstone

This is a web app so I cannot give you a URL, it is an IE only
problem, it happens on all systems, all IE versions and on all Windows
versions.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Fri, 18 Jan 2008 15:09:45 GMT
Flintstone scribed:
There are 3 or 4 places I could have posted this but I think this
group is the most likely to come up with a solution.

I have a web app written in ASP.NET with an external stylesheet which
is actually an aspx file. Normally the page loads fine and all styles
are applied correctly but I have discovered a weird IE only problem.

1) Copy some text from the web page
2) Paste the text into Word
3) Close the web page and open it again.

Magically all my CSS styles vanish. The strangest thing is that if I
look at the DOM in IEs Web Developer Toolbar all of the colors, styles
etc from the stylesheet are present but for some reason they are not
applied.

I have tried setting the stylesheet to disabled
(document.styleSheet[0].disabled=true) and then enabling it again but
that seems to make no difference.

Pressing F5 fixes the page but I really need a more permanent fix.

Does anybody have and idea why this happens or what I could do about
it?

Interesting screw-up. Are you using xhtml or html? I suspect it is just
another one of the myriad IE faults but you could try playing with the
cache to see if it makes any difference.
 
F

Flintstone

Yes, clearing the cache does fix it until the next time. I suppose it
reloads the page and the reload forces it to re-render the HTML
elements. I suspect there is some kind of internal cacheing going on
apart from the normal internet cache.

Pa Bear, excellent idea ... I will post on the MS IE Dev forums.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top