Connecting Tech Pros Worldwide Help | Site Map

DynamicScriptAndExternallCSS

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 5th, 2005, 08:15 PM
Randall Hale
Guest
 
Posts: n/a
Default DynamicScriptAndExternallCSS

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, 09:35 PM
VK
Guest
 
Posts: n/a
Default 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, 10:45 PM
Randall Hale
Guest
 
Posts: n/a
Default 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 5th, 2005, 11:05 PM
VK
Guest
 
Posts: n/a
Default 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>.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.