Jump to content

Recommended Posts

I created a dynamic navigation list for my website based off of a table in my database. The code is working perfectly in IE (I have version 8 on this computer) But it wont work on Firefox. I'm not 100% positive that it is the PHP code causing problems either. The php code that I am using is as follows:

 

$sql = "SELECT Category_Name From Blog_Categories";
	$result = $this->dbc->query($sql);
		while($row = mysql_fetch_assoc($result))
		{
			echo "<li>";
			$name=$row['Category_Name'];
			echo '<a href="'.$name.'.php">';
			echo "$name";
			echo "</a>";
			echo "</li>";

 

This renders the following HTML on the page:

 

<li><a href="Sql Queries.php">Sql Queries</a></li>
<li><a href="Random Code.php">Random Code</a></li>
<li><a href="Tech Support.php">Tech Support</a></li>

 

My only other thinking is that it could be my div blocks overlapping that are causing problems, but during my testing (Before I put the PHP code in to populate the nav bar and it was just test links) everything was working fine in Firefox.

 

Thanks for the help

PHP has nothing to do with the client's browser. Any problems with output you would see are due to HTML/CSS/Javascript problems.

 

but as far as your rendered HTML goes, I don't see how firefox would interpret that as something else. Is there anything else that may cause a problem in your script?

 

Edit: didn't even read the blurb abuot the div tags. post the relevant html for that page, including the div tags

It isn't saying there are any errors, but it seems that my content div is overlapping some of my nav links. I tried using z-index to push the nav links above the content, but that didn't work. Is there some other way to push certain div blocks to the top of the page?

 

I know this probably isnt PHP anymore, let me know if I should post in another forum.

 

 

ILMV I am wrapping the li's in ul's

 

here is the complete output code:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<meta name="copyright" content="Copyright 2009" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="all" />

<title>Tech Blog</title>

<link rel="stylesheet" type="text/css" href="/assets/styles/base.css" />
</head>

<body>
<div id="wrapper">
<div class="container top">
</div>
<div id="header">
	<div class="container">
		<div class="btm"></div>

	</div>
</div>
<!-- This Section is for the Left Side Menu bar that has links to different parts of the website -->
<div class="container">
	<ul id="submenu">
		<li class="title"><span>Website Links</span></li>
		<li><a href="## class="selected">Ike Pictures</a></li>
		<li><a href="##">Rx-8 Pictures</a></li>

		<li><a href="##">Vermont Pictures</a></li>
		<li><a href="parks.php">Parks Programs</a></li>
		<li><a href="##">Wedding Website</a></li>
		<li><a href="house.php">Our Home</a></li>
	</ul>

<!-- This section is for the Blog menu on the right side, which has links to blog posts -->
	<ul id="blogmenu">

		<li class="title"><span>Blog Links</span></li>
		<li><a href="Sql Queries.php">Sql Queries</a></li><li><a href="Random Code.php">Random Code</a></li><li><a href="Tech Support.php">Tech Support</a></li>		</ul>
        <div id="content">
		<h1><center>Lorem ipsum</center></h1>
		<h5>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque in ante nisi, sed tempus nisl. Curabitur vitae arcu non urna sagittis vehicula. Nunc rhoncus est mauris. Nullam sed quam vel dolor lobortis convallis sit amet molestie sapien.</h5>

	</div>
	<div class="clear"></div>
</div>
<div id="push"></div>
</div>
<div id="footer">
<div class="container">
	<div class="copyright">Copyright © 2009 </div>

	<div class="links">
		<a href="##">New Post</a>
		<a href="##">Edit Post</a>
		<a href="##">Comment</a>
	</div>
</div>
</div>
</body>

</html>

 

 

I did the Validation, there were a couple errors, but nothing that was causing the issue. That missing " mark wasn't the culprit either.

 

As a note, in adding some more stuff in the content section other links stopped working as the content moved further down the page. So in the original page code posted, the last three links under "website links" would work. On another page, where the text was large enough to span the entire "submenu" all links stopped working.

 

again, this is no longer a php issue, so if I need to post somewhere else please let me know.

 

Thanks for the help so far.

as I said before, client browsers aren't affected by PHP, but by HTML/CSS/Javascript, etc. I suggest completely validating your XHTML and CSS, and if its completely valid, than consulting the FF developers about a possible bug. but if you say there are a few errors, than those errors could contribute to FF being messed up

I did Validate the XHTML and CSS and fixed the few errors, the problem was still appearing though.

 

I did however find out what was causing the issue, in my "content" section I had inadvertently deleted a float: left; which was causing the content to be spanned across the entire page.

 

Thanks for everyone's help.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.