homepage Welcome to WebmasterWorld Guest from 54.227.146.68
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Expanding CSS!
Pulling the styles from CSS and putting that into document!
Srikanth




msg:1198331
 9:17 am on May 5, 2003 (gmt 0)

Dear friends

I'm looking for a way by which I can convert an HTML and CSS to a file, in which the styles will be expanded and put in each and every places where it is mentioned. I know that this is a weird and also a step-back process. But, I'm in need of such a Converter/Compressor, which will do this job.

SIMPLE EXAMPLE:

<style type="text/css">
<!--
p {
font-family: Verdana, Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
-----------------------------------------------------
//With CSS
<body>
<p>1st paragraph</p>
<p>2nd paragraph</p>
<p>3rd paragraph</p>
-----------------------------------------------------
//Without CSS
<p><font face="Verdana, Arial, Helvetica, sans-serif">1st paragraph</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif">2nd paragraph</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif">3rd paragraph</font></p>

Thanks
Srik

 

dmorison




msg:1198332
 9:32 am on May 5, 2003 (gmt 0)

Not sure if this will help, but you might be able to do something with Internet Explorer's "Save As Web Archive (single file)" functionality.

This puts everything, css, images 'n' all into a single file. The resulting format is a hotch potch of HTML and MIME encoded content, but it might help you out.

Just browse to a web page on Internet Explorer, select "File ¦ Save As..." then choose "Web Archive, single file (*.mht)".

Srikanth




msg:1198333
 9:58 am on May 5, 2003 (gmt 0)

It didn't work. It gave me the same file but with lot of unnecessary text. Thank your for your suggestion. If anyone knows the solution, please help me.

Srik

ricfink




msg:1198334
 3:27 pm on May 5, 2003 (gmt 0)

I think you're going to need a home grown solution to this.
A script which parses the style sheet and then finds each element and class and inserts the appropriate rule.

Like you said, it's an odd request and while it would certainly be worth the time to do a search of the shareware sites on the off-chance you might find something, but I doubt if you're going to find anything that will do the job.

Srikanth




msg:1198335
 5:58 am on May 6, 2003 (gmt 0)

Yeah. I've got it. There is an application called "FILTRIX" which does this job. This option is also available in Dreamweaver(File -> Convert -> 3.0 Browser compatible)

Thank you all for your comments.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved