CSS not rendering in dynamic areas of an HTML page - IE only

B

brian.turner

This is sort of a design/javascript question. It involves CSS
rendering in dynamic areas of a page using IE.

E 6 & 7

HI There, We've created some example static html pages (using CSS)
that look great in IE. We are now converting these into dynamic pages
that use javascript to dynamically update certain areas of the page.
After the conversion the dynamic areas of the page do not render the
CSS styles (the styles are not displaying correctly). This only
happens in IE. The styles display correctly for other browsers
(firefox).

I am using the javascript DOM to update the dynamic areas of the site.
For example when creating a <a> tag that needs attribute
class=over....I add the following code.

linktag = document.createElement("a");
linktag.setAttribute("href",pathName);
linktag.setAttribute("class","over");

it's the class=over that is not rendering when the page is updated.
Has anyone seen this?

Thanks,

Brian
 
A

Andrew Poulos

linktag = document.createElement("a");
linktag.setAttribute("href",pathName);
linktag.setAttribute("class","over");

it's the class=over that is not rendering when the page is updated.
Has anyone seen this?
I believe you need to use 'className' ('class' is, I think, a reserved
word) ie.

linktag.className = "over";


Andrew Poulos
 
B

brian.turner

thanks!!! That worked!

Andrew said:
I believe you need to use 'className' ('class' is, I think, a reserved
word) ie.

linktag.className = "over";


Andrew Poulos
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top