wikedawsum Posted March 7, 2008 Share Posted March 7, 2008 Can anyone tell me why the following php code will not output my css, or create workable links in Firefox? <?php if (mysql_num_rows($res) > 0){ while ($row = mysql_fetch_assoc($res)){ echo "<p><a href='american.php'>View All</a></p>"; echo "<h2>{$row['name']}</h2>"; echo "<h3 class='main'><a href='{$row['page']}' target='_blank'>View Menu</a></h3>"; echo "<p class='left'>{$row['address']}<br />"; echo "{$row['city']}, {$row['state']} {$row['zip']}<br />"; echo "{$row['phone']}</p>"; echo "<p class='left'><b>Type of Cuisine:</b> {$row['type']}</p>"; echo "<p class='left'><b>Style:</b> {$row['style']}</p>"; echo "<p class='left'><b>Hours:</b> {$row['hours']}</p>"; echo "<p class='left'><b>Meals:</b> {$row['meals']}</p>"; echo "<p class='left'><b>Prices:</b> {$row['prices']}</p>"; echo "<p class='left'><b>Payment Notes:</b> {$row['payment_notes']}</p>"; echo "<p class='left'><b>Payment Methods:</b> {$row['payment_methods']}</p>"; echo "<p class='left'><b>Alcohol:</b> {$row['alcohol']}</p>"; echo "<p class='left'><b>Handicap Access:</b> {$row['handicap_access']}</p>"; echo "<p class='left'><b>Seating Capacity:</b> {$row['seating_capacity']}</p>"; echo "<p class='left'><b>Parking:</b> {$row['parking']}</p>"; echo "<p class='left'><b>Smoking:</b> {$row['seating']}</p>"; echo "<p class='left'><b>Reservations:</b> {$row['reservations']}</p>"; echo "<p class='left'><b>Attire:</b> {$row['attire']}</p>"; echo "<p class='left'><b>Age Restrictions:</b> {$row['age_restrictions']}</p>"; echo "<p class='left'><b>Services:</b> {$row['services']}</p>"; } } else if (mysql_num_rows($res2) > 0){ while ($row2 = mysql_fetch_assoc($res2)){ echo "<p>For more information, click on a restaurant name.</p>"; echo "<h2><a href='american.php?id=".$row2['id']."'>{$row2['name']}</a></h2>"; echo "<p class='left'>{$row2['address']}<br />"; echo "{$row2['city']}, {$row2['state']} {$row2['zip']}<br />"; echo "{$row2['phone']}</p>"; echo "<div class='hr'><hr></div>"; } echo "<br /><br />"; if ($page1 > 1) { $prev = ($page1 - 1); echo "<a href=\"american.php?page=$prev\"><< Next 10</a> "; } if ($page1 < $total_pages) { $next = ($page1 + 1); echo "<a href=\"american.php?page=$next\">Previous 10 >></a>"; } } ?> In IE, this works perfectly. I can click on a restaurant name and it then displays more information about that restaurant. In Firefox, if I view the source, I can see that the restaurant name IS a link, and I can also see that the proper text styles are being used, but it does not display them and the restaurant name (which is a link) is not clickable. I honestly have no idea what the issue is.. php, or css. My guess is the php because of the fact that the site works in IE. This is really bugging me. Thanks, wikedawsum Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/ Share on other sites More sharing options...
eddierosenthal Posted March 7, 2008 Share Posted March 7, 2008 i would first try to validate using the w3c validator, and then if all is looking good switch the double quotes to single quotes, and single quotes to double quotes, but only within a pair of single quotes. Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486455 Share on other sites More sharing options...
wikedawsum Posted March 7, 2008 Author Share Posted March 7, 2008 Hello, eddierosenthal. I ran my css through the validator. It found a few errors which I cleaned up. Tried the site with just the new css and it did not work. I then tried your other suggestion, and still could not get it to work. :-\ Thanks for the suggestions, though. Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486487 Share on other sites More sharing options...
BlueSkyIS Posted March 7, 2008 Share Posted March 7, 2008 do you have the page up on a site so we can see it? Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486488 Share on other sites More sharing options...
wikedawsum Posted March 7, 2008 Author Share Posted March 7, 2008 Yes, you can view the site here: http://www.dinetx.com/pages/american2.php Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486494 Share on other sites More sharing options...
thebadbad Posted March 7, 2008 Share Posted March 7, 2008 Your problem is in your CSS. The footer (div#footer) is in front of the content, thus making it unclickable. Add a z-index in you CSS, and it should work as intended: from style.css #container { //your code, then add this: z-index:1; } Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486513 Share on other sites More sharing options...
Lamez Posted March 7, 2008 Share Posted March 7, 2008 make a link like this <?php echo '<a href="page.php">page</a>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486530 Share on other sites More sharing options...
wikedawsum Posted March 7, 2008 Author Share Posted March 7, 2008 thebadbad, thank you VERY much. Sometimes I'm not sure when to use z-index.. but that did fix the problem. I appreciate everyone's replies! Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486585 Share on other sites More sharing options...
BlueSkyIS Posted March 7, 2008 Share Posted March 7, 2008 NOTE: IE is the browser that had it wrong. Firefox was working properly. Quote Link to comment https://forums.phpfreaks.com/topic/94963-php-css-and-firefox/#findComment-486588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.