R
Rich Bradshaw
Hi,
Sorry about the long title - I have a page with a navbar on. I would
like like to make it so that the links that link to the page the user
is on are a different color.
The problem is, that I want to keep the menu in a file so that I can
server side include it, so I don't want to have to change it manually
for each page.
To help explain this, the page looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Contact</title>
<link rel="stylesheet" type="text/css" href="styles/style.css"
media="screen" />
</head>
<body>
<div id="wrap">
<?php include("menu.php"); ?>
<div id="column1">
</div>
<div id="column2">
</div>
</div>
</body>
</html>
Where menu.php looks like this:
<div id="navbar">
<ul id="navlist">
<li><a href="weddings.php">home</a></li>
<li><a href="approach.php">our approach</a></li>
<li><a href="products.php">products & services</a></li>
<li><a href="gallery.php">gallery</a></li>
<li><a href="prices.php">prices</a></li>
<li><a href="booking.php">booking</a></li>
<li><a href="contact.php">contact</a></li>
<li><a href="links.php">links</a></li>
</ul>
</div>
Obviously there is some css formatting here as well.
If we are on contact.php, I want the link to contact.php to be styled
differently so that we know where we are.
Is there any way to do this without getting rid of the server side
include or drastically making the site more complex?
Thanks a lot,
Rich
Sorry about the long title - I have a page with a navbar on. I would
like like to make it so that the links that link to the page the user
is on are a different color.
The problem is, that I want to keep the menu in a file so that I can
server side include it, so I don't want to have to change it manually
for each page.
To help explain this, the page looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Contact</title>
<link rel="stylesheet" type="text/css" href="styles/style.css"
media="screen" />
</head>
<body>
<div id="wrap">
<?php include("menu.php"); ?>
<div id="column1">
</div>
<div id="column2">
</div>
</div>
</body>
</html>
Where menu.php looks like this:
<div id="navbar">
<ul id="navlist">
<li><a href="weddings.php">home</a></li>
<li><a href="approach.php">our approach</a></li>
<li><a href="products.php">products & services</a></li>
<li><a href="gallery.php">gallery</a></li>
<li><a href="prices.php">prices</a></li>
<li><a href="booking.php">booking</a></li>
<li><a href="contact.php">contact</a></li>
<li><a href="links.php">links</a></li>
</ul>
</div>
Obviously there is some css formatting here as well.
If we are on contact.php, I want the link to contact.php to be styled
differently so that we know where we are.
Is there any way to do this without getting rid of the server side
include or drastically making the site more complex?
Thanks a lot,
Rich