View Full Version : Navigation does not Display on Webpage

04-26-2007, 04:15 PM
I'm having a problem with my navigation not displaying on my webpage. It's weird because when it doesn't display and you view source on the page, the code is present in the page. If you take your mouse and highlight over the area nothing select as if it's not there. I was thinking maybe the text just showed up white and i couldn't see it, but no it's just not displaying. Every time i refresh the page the navigation will show up. I don't want to have to refresh the page everytime i login. HELP! PLEASE!

This is what i have in my include file for the nav.

echo '<DIV id=leftcol>';
echo '<UL id=nav>';
//if(isset($_SESSION['username'])) {
echo '<LI><a href="./main.php">Main</a></LI>';
echo '<LI><A href="./add_job.php">Add Job</A></LI>';
echo '<LI><A href="./edit_job.php">Edit Job</A></LI>';
echo '<LI><A href="./add_rfi.php">Add RFI</A></LI>';
echo '<LI><A href="./add_note.php">Add Note</A></LI>';
echo '<LI><A href="./installation.php">Installation</A></LI>';
echo '<LI><A href="./punch_list.php">Punch Lists</A></LI>';
echo '<LI><A href="./users.php">Users</A></LI>';
echo '</UL>';
echo '</DIV>';

Thanks for the help in advance.

04-26-2007, 04:19 PM
Do you have an actual URL we can test?
I'm thinking it might be a browser issue and we can test FF, IE, safari, etc.

04-26-2007, 04:23 PM
You must use dreamweaver or something... I can't stand caps in code and its lazily done. <div id="leftcol"> For example.

But to the question at hand. That's how your code looks right now? With the commented $_SESSION? As when you said you have to refresh the page to get the nav to show up, it seems your username variable wasn't being set into the session until that page, and then you had to refresh for the action to take place. But if its commented and you have NO OTHER code involved above or below, then I would say it should work. BUT Im guessing you have other code involved that is preventing this to be displayed on initial load. You have to be setting something or wrapping it some how.

CSS troubles?

04-26-2007, 04:47 PM
I commented the session stuff out in my attempt to trouble shoot why this is happening. I thought maybe it was a session issue, but with it commented out there is no other excuse. Here is my header that is called right before the leftcol is included.

<DIV id=header>
<DIV id="toplogo"><img src="./images/polv-logo.jpg" /></div>
if(isset($_SESSION['username'])) {
$username = $_SESSION['username'];
echo '<UL id=topnav>';
echo '<LI class=sitemap><p>Hello ' . $username. ' you are logged in!</p></LI>';
echo '<LI class=sitemap><A href="./logout.php">Logout</A></LI>';
echo '</UL>';
</DIV> <!--End of Header -->

The header code works all of the time with no problems.

04-26-2007, 04:53 PM
Well troubleshoot it... Remove your css file. Remove all data from the page except the nav. Keep removing and adding back until you find the code that is causing it. Best way to learn is to do.

01-20-2008, 08:34 PM
In case anyone else has this problem...

I fixed it within my css. I simply had to set the width parameter and the text showed up. I guess it was running off the page somehow and becoming invisible.

01-20-2008, 09:00 PM
I'd also get into the practice of using " around class and id names because that will have some implications on browser problems