Topic: Apply Style Without Editing Page (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=26761" title="Pages that link to Topic: Apply Style Without Editing Page (Page 1 of 1)" rel="nofollow" >Topic: Apply Style Without Editing Page <span class="small">(Page 1 of 1)</span>\

 
Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 10-01-2005 02:38

This may have more to do with server-side scripting, but we'll start here in case there's a simpler answer.

Here's what I want to do. For the book I'm working on, I've got a spreadsheet of information I need to publish to the Web for those I'm collaborating with. It's basically a fancy to-do list. It's all kept in Excel 2000 and I'm exporting it as a Web page from there. Of course it's filled with MS garbage, but nothing causes a problem except for the widths it adds to the tables and table cells.

All I want to do is apply the styles:

code:
table { width: auto !important; }
td { width: auto !important; }


without having to edit the page every time I save it. There's way too much else to do and too much else to remember without having to edit the stylesheet every time I update the to-do list.

Is there a way to force a page to use a stylesheet (from the perspective of the publisher) without touching the page? Some .htaccess hocus pocus maybe?

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 10-01-2005 05:08

I would simply load the page via a template page that calls the CSS, and includes the excel output file.

That's the simplest route I can see, unless it's possible to edit the default page that excel outputs?

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 10-01-2005 06:01

Problem with including it into another document is that the document that Excel exports has its own headers and stuff.

And I haven't been able to find any templates or anything for the output.

Just tried to include the style in the spreadsheet itself, but I can't keep it from converting it to special characters.

Oh, where's the magic?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-01-2005 06:21

You could use htaccess to redirect web page URLs to a CGI script URL with the page given as an argument, and have the script find a reasonable place to insert the style sheet if it's the right page.


 

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 10-01-2005 09:27

If your server is Apache I believe there's a httpd.conf directive that can also be used in a .htaccess file to replace the headers of all pages called within that directory with the given HTML header. Just let me look it up, and we'll see.


Justice 4 Pat Richard

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 10-01-2005 11:08

the htaccess would only replace the http headers - which have nothing to say about the stylesheet.

slime is on the write way - have a script that replaces the css in the document and then outputs the document (with the appropriate headers, of course).

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 10-01-2005 15:47

No, according to Apache.org:

quote:
HeaderName <filename>
Name of the file that will be inserted at the top of the index listing



So if one were to make sure the file was called index.html...


Justice 4 Pat Richard

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 10-04-2005 23:03

You know, I wasn't sure that would work at first, but rereading it, it might do the trick.

I'm further away from finishing the preliminary list than I thought, so when I'm done I'll see if I can make it work.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu