Silkroad Online Forums
http://www.silkroadforums.com/

CSS Template woes
http://www.silkroadforums.com/viewtopic.php?f=9&t=188
Page 1 of 1

Author:  Ryoko [ Mon Jan 16, 2006 4:12 am ]
Post subject:  CSS Template woes

Maybe XiJiouKan or another can shed some light.

The CSS is currently included in the code of EVERY page.

I beleive I can reduce a third of the page coding by placing it into a CSS template, of course. Then it stays in your internet cache, reducing load and bandwidth.

The CSS uses {cute} variables driven by the forum, so you cant just copy paste.

I copied the final CSS from the 'source' of the forum page.

But when I link it into a file, a lot of CSS is lost.

So I am at an impass. Can't seem to figgure out why its doing that.

Author:  XiJiouKan [ Mon Jan 16, 2006 4:27 am ]
Post subject: 

I'm not sure what you mean by '{cute}' variables, but here's a quick overview of linking separate css templates to pages (Just to be sure we're on the same page).

All the css code goes into a file "whatever.css". To integrate it into the page, you use a <LINK REL=stylesheet HREF="whatever.css" TYPE="text/css">. Then, in the whatever.css, there is no <style type="text/css"></style> in the file. (The browser should insert the tags automatically)

I think the problem may lay in what the {cute} variables are, but I don't know what you mean.

Author:  Ryoko [ Mon Jan 16, 2006 4:34 am ]
Post subject: 

The forum is template driven. Header, subheader, bodies, footer, etc.

They are not 'pure' html files.

When you want to use a variable, the name is {variable}.

Thus ALL css items are {variable} color, height, width, etc.

When the forum calls a template, it processes them. Same for loops. It has tags you use to make it loop.

My other sites have style sheets; I linked it in correctly but some info is lost.

Clueless.

Author:  XiJiouKan [ Mon Jan 16, 2006 4:49 am ]
Post subject: 

From what I just got from your last post, the PHP processes and makes dynamic changes to the css based on the content.

If what I understand is true, then it isn't possible to take out all the css and move it to a file.

What could be done in that case is to take out the css that needs processing, (body) and make the headers, footers, subheaders static.

Using the <link rel=..... method only acts like an #include [I forgot the php term for includes, I'm forced to code in ASP VBscript because the school i work for won't let me install a php module. Still eating crow. *sigh* :( ]

Author:  Ryoko [ Mon Jan 16, 2006 5:22 am ]
Post subject: 

Exactly

Its dynamic based on the forum setting variables.

Thats why I went to View --> Source and copied the final output instead

But no luck yet.

Author:  Ryoko [ Mon Jan 16, 2006 5:31 am ]
Post subject: 

I think I got it to work!

It was the @import statement for IE/Mozilla only

Author:  XiJiouKan [ Mon Jan 16, 2006 7:56 am ]
Post subject: 

Good! I'm glad.

I've never heard of @import. (But then again, I know more about ASP than PHP.) (PHP is next on the list of languages to learn.)

Let me know how it works out.

Author:  Ryoko [ Mon Jan 16, 2006 9:05 am ]
Post subject: 

It appears it is a CSS statement :D

And first time I ran into it as well.

Author:  jjuewzkio763 [ Wed Nov 09, 2022 10:40 am ]
Post subject:  Re: CSS Template woes

< Removed >

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/