Connecting Tech Pros Worldwide Help | Site Map

DynamicScriptAndExternallCSS

  #1  
Old November 5th, 2005, 09:15 PM
Randall Hale
Guest
 
Posts: n/a
I some HTML pages linked to an external stylesheet. I also have a js script
which creates a set of links for each page (which function is called during
the body_onload event).

But when the links are created they adopt default browser style.

How can I apply the external style rules to the newly-created elements
WITHOUT mixing (duplicate!) in-line style tags with my javascript routine?

:-| TIA


  #2  
Old November 5th, 2005, 10:35 PM
VK
Guest
 
Posts: n/a

re: DynamicScriptAndExternallCSS



Randall Hale wrote:[color=blue]
> I some HTML pages linked to an external stylesheet. I also have a js script
> which creates a set of links for each page (which function is called during
> the body_onload event).
>
> But when the links are created they adopt default browser style.[/color]

Does it mean by any chance that visited links do not hover / colored as
css'ed ? Just exploring one possibility...

  #3  
Old November 5th, 2005, 11:45 PM
Randall Hale
Guest
 
Posts: n/a

re: DynamicScriptAndExternallCSS


Yes, that was part of the problem, but I don't know what to say now, for the
problem seems to have healed itself. That is, I tried outputting a dynamic
child #Div, defined style rules for it, and it worked just fine. But to
verify the original problem (why, don't ask) I removed the new Div from the
js output and --!!???!! -- it STILL worked. Now I can't reproduce the
original NON-problem and will assume that the browser is after all smart
enough to apply/reapply style rules for any subsequent dynamic output.

Thanks anyway and sorry for wasting everyone's time! :-o


  #4  
Old November 6th, 2005, 12:05 AM
VK
Guest
 
Posts: n/a

re: DynamicScriptAndExternallCSS


Randall Hale wrote:[color=blue]
> the problem seems to have healed itself.[/color]

I'm happy for you :-)

Just be aware of an important link styling twist:
<http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets/browse_frm/thread/936a815501359f6b/b36c901ab25d3f61#b36c901ab25d3f61>


Pure speculation - but while trying to solve your problem you might
occasionally rearrange link styles in that <right order>.

Closed Thread