Verna
04-06-2007, 09:56 AM
I made a menu that should know what page the visitor is in and it worked earlier when I was testing the layout. When it was ready I moved it to another folder in the server so it would show up for users, but it no longer works. I have triple checked that all the image addresses are right so at this point I can't think of what went wrong.
Navigation on file:
<div id="navigation">
<ul>
<li<?php if ($thisPage=="Alkusivu")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/index.php">ALKUSIVU</a></li>
<li<?php if ($thisPage=="Karvakorvat")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/karvakorvat.php">KARVAKORVAT</a></li>
<li<?php if ($thisPage=="Koulutus")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/koulutus.php">KOULUTUS</a></li>
<li<?php if ($thisPage=="Tietopankki")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/tietopankki.php">TIETOPANKKI</a></li>
<li<?php if ($thisPage=="In English")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/inenglish.php">IN ENGLISH</a></li>
<li<?php if ($thisPage=="Linkit")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/linkit.php">LINKIT</a></li>
</ul>
</div>
Navigation part of the css:
#navigation ul {
list-style: none;
margin: 0;
padding:10px 10px 0;
}
#navigation li {
float: left;
background:url("http://phantasmagory.net/doggit/layout/norm_right.gif")
no-repeat right bottom;
margin: 0;
padding: 0;
}
#navigation a {
display:block;
background:url("http://phantasmagory.net/doggit/layout/norm_left.gif")
no-repeat left bottom;
padding:5px 15px;
text-decoration: none;
font-size: 10px;
color: #413625;
}
#navigation a {float:none;}
#navigation #currentpage {
background-image:url("http://phantasmagory.net/doggit/layout/norm_right_on.gif");
}
#navigation #currentpage a {
background-image:url("http://phantasmagory.net/doggit/layout/norm_left_on.gif");
}
Te background image for the links should change if the visitor is on the same page with any of those links, but it just stays the same. Other than that everything seems to work.
Navigation on file:
<div id="navigation">
<ul>
<li<?php if ($thisPage=="Alkusivu")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/index.php">ALKUSIVU</a></li>
<li<?php if ($thisPage=="Karvakorvat")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/karvakorvat.php">KARVAKORVAT</a></li>
<li<?php if ($thisPage=="Koulutus")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/koulutus.php">KOULUTUS</a></li>
<li<?php if ($thisPage=="Tietopankki")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/tietopankki.php">TIETOPANKKI</a></li>
<li<?php if ($thisPage=="In English")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/inenglish.php">IN ENGLISH</a></li>
<li<?php if ($thisPage=="Linkit")
echo " id=\"currentpage\""; ?>>
<a href="http://phantasmagory.net/doggit/linkit.php">LINKIT</a></li>
</ul>
</div>
Navigation part of the css:
#navigation ul {
list-style: none;
margin: 0;
padding:10px 10px 0;
}
#navigation li {
float: left;
background:url("http://phantasmagory.net/doggit/layout/norm_right.gif")
no-repeat right bottom;
margin: 0;
padding: 0;
}
#navigation a {
display:block;
background:url("http://phantasmagory.net/doggit/layout/norm_left.gif")
no-repeat left bottom;
padding:5px 15px;
text-decoration: none;
font-size: 10px;
color: #413625;
}
#navigation a {float:none;}
#navigation #currentpage {
background-image:url("http://phantasmagory.net/doggit/layout/norm_right_on.gif");
}
#navigation #currentpage a {
background-image:url("http://phantasmagory.net/doggit/layout/norm_left_on.gif");
}
Te background image for the links should change if the visitor is on the same page with any of those links, but it just stays the same. Other than that everything seems to work.