[thelist] How to style a widget?

Will willthemoor at gmail.com
Wed Jun 17 19:31:21 CDT 2009


You could use JS to insert the CSS as well. Sorta gross but it works.

Style tags inserted in the body of the doc will work too. If you're
doing it with JS, the doc will still validate.

Will

On Wed, Jun 17, 2009 at 12:15 PM, Jay Turley<jayturley at gmail.com> wrote:
> Hi all-
>
> Creating a javascript widget to be placed on the sites of clients of a
> client, and I am wondering what is the best way to handle styling the
> widget.
>
> The widget is loaded using the following code:
>
>  <script type="text/javascript">
>     document.write(unescape("%3Cscript src='[widget_url]'
> type='text/javascript'%3E%3C/script%3E"));
>  </script>
>
> As far as I know, <style> and <link> tags must appear in the <head> section.
>
> This pretty much means that either:
>
> (1) All styling must be inline, or
>
> (2) I must ask for users of the widget to add the CSS using <style> or
> <link> - making it more difficult to place.
>
> Am I missing something?
>
> thanks!
>
> -Jay
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list