This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2006 > Re: Tool to group STYLE tags together?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Tool to group STYLE tags together?
Toby Inkster

2006-11-19, 7:35 pm

John Dalberg wrote:

> I am using an application that dynamically creates style tags all over
> the place in the html file. I mean some inside the head section and some
> in the body section. I have no control over this.


Do you mean style *elements* or style *attributes*? Style *elements* look
something like this:

<style type="text/css">
...
</style>

whereas style attributes look like this:

style="..."

It really helps if you use the correct terminology, as the answers may be
different for each interpretation.

In the case of <style> elements, it should be relatively easy to
post-process the page (using e.g. regular expressions in PHP) to merge
pull out the CSS from several style blocks and concatenate them into one.

In the case of style attributes on other elements, things get a bit more
tricky. It could also be done with a bit of scripting, but would require
more work.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews