sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Abel's Avatar

Variable not used in adocument.css.php


Question posted by: Abel (Guest) on January 17th, 2007 10:35 AM
Hi,

I use an 'adocument.css.php' document, which is used as a CSS template.
Having just installed PHP 5.2.0 on my Win XP system, I checked on old
code of a website I made in the past. One of the first this I noticed,
my 'Main Navigation Container', containing a menu with different choices
was not viewable anymore. I think this must be because the background
color variable is not used to set the background to dark blue. Could
that be because PHP 4.0 works different from 5.2.0? And what do I need
to do to view the page as it is intended to?

I got the following lines:
<?php
header("Content-type: text/css");
$blueDark = "#000066";
?>

and
/* ======== Main navigation container ======== */
#mainnav
{
background-color: <?= $blueDark; ?>;
padding: 2px 0;
margin-bottom: 22px;
}

#mainnav ul
{
margin: 0 0 0 20px;
padding: 0;
list-style-type: none;
/* border-left: 1px solid #fff; */
}

#mainnav li a
{
text-decoration: none;
padding: 0 10px;
color: #fff;
}

So what do I need to do? Change all occurrences of $blueDark with "#000066"?

Abel
2 Answers Posted
Captain Paralytic's Avatar
Captain Paralytic January 17th, 2007 10:35 AM
Guest - n/a Posts
#2: Re: Variable not used in adocument.css.php


Abel wrote:
Quote:
Originally Posted by
Hi,
>
I use an 'adocument.css.php' document, which is used as a CSS template.
Having just installed PHP 5.2.0 on my Win XP system, I checked on old
code of a website I made in the past. One of the first this I noticed,
my 'Main Navigation Container', containing a menu with different choices
was not viewable anymore. I think this must be because the background
color variable is not used to set the background to dark blue. Could
that be because PHP 4.0 works different from 5.2.0? And what do I need
to do to view the page as it is intended to?
>
I got the following lines:
<?php
header("Content-type: text/css");
$blueDark = "#000066";
?>
>
and
/* ======== Main navigation container ======== */
#mainnav
{
background-color: <?= $blueDark; ?>;
padding: 2px 0;
margin-bottom: 22px;
}
>
#mainnav ul
{
margin: 0 0 0 20px;
padding: 0;
list-style-type: none;
/* border-left: 1px solid #fff; */
}
>
#mainnav li a
{
text-decoration: none;
padding: 0 10px;
color: #fff;
}
>
So what do I need to do? Change all occurrences of $blueDark with "#000066"?
>
Abel

Try chaging it to <?php echo $blueDark; ?>;

Abel's Avatar
Guest - n/a Posts
#3: Re: Variable not used in adocument.css.php

Captain Paralytic wrote:
Quote:
Originally Posted by
Try chaging it to <?php echo $blueDark; ?>;
>

Yup, that did it. Thanks.
Abel
 
Not the answer you were looking for? Post your question . . .
197,003 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,003 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors