By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,744 Members | 1,696 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,744 IT Pros & Developers. It's quick & easy.

Variable not used in adocument.css.php

P: n/a
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
Jan 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Abel wrote:
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; ?>;

Jan 17 '07 #2

P: n/a
Captain Paralytic wrote:
Try chaging it to <?php echo $blueDark; ?>;
Yup, that did it. Thanks.
Abel
Jan 17 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.