0

Good Morning.

I'm hoping someone can tell me why this isn't working, or maybe if it isn't supposed to work.

I've been reading on various websites that you can use variables within CSS if you don't save the style sheet as a .css, but rather as a .php and just tell the script the the content is text/css.

So I tried it. Using a known good css file, I copied the content into a new page and saved it as style.php

at the top of the page I put:

<?php header(“Content-type: text/css”); ?>

and left the balance of the code alone

Then on the index page that references the stylesheet I put:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">

  <title>mhaonlinegrocery.com</title>
  <meta name="description" content="Easy to use Shop at Home Grocery Service that Delivers your Non-Perishable groceries direct to your door Free of shipping charges">
  <meta name="keywords" content="discount grocery, discount, groceries, shop at home, Free Delivery, Brand Name Groceries, savings">
    <link href=”style.php” rel=”stylesheet” type=”text/css” />
</head>

What happened after uploading to the server is that I lost all of the styling from the CSS.

Any suggestions on how to make this work?

The reason for the change over is so I can use variables in a members site so they can change the look and feel of their individual site, by simply changing color values in their back office.

Thanks in advance for your feedback.

Douglas

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by showman13
0

Pritaeas,

Thank you for your reply. Didn't realize you replied, but did find that to be the issue.

As soon as I replaced the copied quotes with true quotes, it worked fine.

Isn't it amazing how something so simple can cause so much trouble...

Thanks again
Douglas

this is another issue solved...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.