Reply to Re: Appending style sheet elements

Your name:

Reply:


Posted by Neredbojias on 01/18/20 11:33

With neither quill nor qualm, delraydog@gmail.com quothed:

> I'm writing a reusable JavaScript library which needs to set certain
> styles in a document. The document may have an existing stylesheet
> definition either by a link or by an existing stylesheet declaration in
> the documents head section.
>
> How can I use JavaScript to append my own style sheet information to a
> possibly already existing stylesheet definition?

That's no problem. The latest style is the one honored. Add something
like the following to the <head> section:

<script type="text/javascript">
<!--
document.write('<style type="text\/css">\n#ct1 { width:95.2%; text-
align:justify; }\n<\/style>\n');
document.close;
//-->
</script>

PS: This example is from one of my pages, has been checked and works.

--
Neredbojias
Contrary to popular belief, it is believable.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация