budimir Posted December 7, 2010 Share Posted December 7, 2010 Guys, i don't understand why this code is working under IE8, but not under Firefox 3.1 or Chrome 8. Can you please help? I don't see what's wrong. <?php if ($a_korisnici == 1) { echo '<a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a>'; } else { echo "";} if ($a_clanovi == 1) { echo "<a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a>"; } else { echo ""; } if ($a_slike == 1) { echo "<a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a>"; } else { echo ""; } if ($a_vijesti == 1) { echo "<a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a>"; } else { echo ""; } if ($a_natjecanja == 1) { echo "<a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a>"; } else { echo ""; } if ($a_newsletter == 1) { echo "<a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a>"; } else { echo ""; } ?> Quote Link to comment Share on other sites More sharing options...
trq Posted December 7, 2010 Share Posted December 7, 2010 Define 'not working'. Quote Link to comment Share on other sites More sharing options...
budimir Posted December 7, 2010 Author Share Posted December 7, 2010 I can see images, but I can't click on them to get to link they are linked too. ??? Quote Link to comment Share on other sites More sharing options...
trq Posted December 7, 2010 Share Posted December 7, 2010 What does your actual html source look like (right click -> view source)? Quote Link to comment Share on other sites More sharing options...
budimir Posted December 8, 2010 Author Share Posted December 8, 2010 Hi thorpe, Ihave went through it once again, but I don't understand. The compelt code is below... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <?php include("include/session.php");?> <title>Werdum Combat Team Karlovac</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link type="text/css" rel="stylesheet" href="style.css" /> <script type="text/javascript" src="js/mootools-for-dropdown.js"> </script> <script type="text/javascript" src="js/UvumiDropdown-compressed.js"> </script> <link rel="stylesheet" type="text/css" media="screen" href="css/uvumi-dropdown.css" /> <style type="text/css"> body1,html1{ background-color:#333; margin:0; padding:0; font-family: "Times New Roman", Times, serif; } #main{ margin:0% auto; width:824px; height:500px; position:relative; overflow:auto; color:#aaa; padding:20px; border:0px solid #888; } </style> <script type="text/javascript"> var menu = new UvumiDropdown('dropdown-demo'); </script> </head> <body> <div id="top"> <div id="main"> <ul id="dropdown-demo" class="dropdown"> <li><a href="index.html">Home</a></li> <li><a >BJJ</a> <ul> <li><a href="bjj.html">O BJJ</a></li> <li><a href="oklubu.html">O Klubu</a></li> <li><a href="treninzi.html">Treninzi</a></li> <li><a href="kimono.html">Kimono</a></li> <li><a href="pravila.html">Pravila</a></li> <li><a href="natjecanja.html">Natjecanja</a></li> </ul> </li> <li><a href="index2.html">Galerija</a></li> <li><a href="index2.html">Vijesti</a></li> <li><a href="index2.html">Forum</a></li> <li><a href="index2.html">Kontakt</a></li> <li><a href="index2.html">Ostalo</a></li> </ul> </div> </div> <div id="header" class="home"> </div> <div id="wrapper" class="style1"> <div id="content"> <table border="1" width="100%"> <td> <p><?php echo "Dobrodošao $ime $prezime, <br /> Ovdje se nalaze informacije samo za članove WTC Karlovac. Sve informacije vezane za tebe, kao korisnika ove stranice su vidljive samo tebi i administratoru ove stranice. Sve osobne informacije neće biti vidljive ostalim članovima ili posjetiteljima ove stranice. Ukoliko imate pitanja ili želite da se neke informacije ne prikazuju, slobodno obavijestite administratora."; ?></p> </td> </table> <p> </p> <p align="center"> <?php if ($a_korisnici == 1) { echo '<a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a>'; } else { echo "";} if ($a_clanovi == 1) { echo "<a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a>"; } else { echo ""; } if ($a_slike == 1) { echo "<a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a>"; } else { echo ""; } if ($a_vijesti == 1) { echo "<a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a>"; } else { echo ""; } if ($a_natjecanja == 1) { echo "<a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a>"; } else { echo ""; } if ($a_newsletter == 1) { echo "<a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a>"; } else { echo ""; } ?> </p> <p align="center"> </p> <div id="left"> <a href="b.php"><img src="images/big_pic.jpg" alt="" width="442" height="200" /></a><br /> <div> <img src="images/title3.gif" alt="" width="81" height="16" /><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Tellus er sodales enim, in tincidunt mauris in odio. Massa ac laoreet iaculipede nisl ullamcorper- massa, ac consectetuer feipsum eget pede. Proin nunc. </p> <a href="#" class="more">more info</a> </div> <div> <img src="images/title4.gif" alt="" width="102" height="16" /><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Donec massa. Nulla pulvinar, nisl ac convallis nonummy, tellus eros sodales enim, in tincidunt mauris in omassa ac laoreet iaculipede nisl ullamcorpermassa,consectetuer.</p> <a href="#" class="more">more info</a> </div> </div> <div> <p> </p> <p> </p> <p><img src="images/title5.gif" alt="" width="368" height="37" /><br /> </p> <div class="block"> <img src="images/pic7.jpg" alt="" width="150" height="100" /> <span>17 december</span><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper. <a href="#" class="more">more info</a></p> </div> <div class="block"> <img src="images/pic8.jpg" alt="" width="150" height="100" /> <span>17 december</span><br /> <p>Lorem ipsum dolor sit amet, sectetu adip scing varius interdum incid unt quis, libero. Aenean mturpis. Maecenas hendrerit masa laoreet iaculipede mnisl ulamcorper.Tellus er sodales enim, in tincidunt mauris in odio. Massa ac laoreet iaculipede nisl ullamcorpermassa, ac consectetuer feipsum eget pede. Proin nunc. Donec massa. Nulla pulvinar, nisl ac convallis nonummy, tellus eros sodales enim, in tincidunt mauris in odio. <a href="#" class="more">more info</a></p> </div> </div> </div> </div> <div id="footer"> <p> </p> <form name="form1" method="post" action=""> <table width="863" border="0"> <tr> <td colspan="8"><div align="center">Ulaz za članove Werdum Combat Team Karlovac</div></td> </tr> <tr> <td width="273"><div align="right">Korisničko ime</div></td> <td width="144"><input type="text" name="ki" id="ki" tabindex="1"></td> <td width="22"> </td> <td width="33"><div align="right">Lozinka</div></td> <td width="144"><input type="password" name="lo" id="lo" tabindex="2"></td> <td width="45"><div align="right"> <input type="submit" name="ulaz" id="ulaz" value="Ulaz" tabindex="3"> </div></td> <td width="83"> </td> <td width="85"> </td> </tr> </table> </form> <p> </p> <p>Werdum Combat Team Karlovac | Dizajn by B&D | Webmaster: bjjkarlovac@gmail.com</p> <p> </p> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
trq Posted December 8, 2010 Share Posted December 8, 2010 What does your actual html source look like (right click -> view source)? Quote Link to comment Share on other sites More sharing options...
haku Posted December 8, 2010 Share Posted December 8, 2010 If you have an HTML question, why are you showing us PHP? Quote Link to comment Share on other sites More sharing options...
budimir Posted December 8, 2010 Author Share Posted December 8, 2010 Because I'm using a href link inside PHP tags and they are not working in some browsers! When I'm using a href as plain HTML everything is OK. That's why I'm showing the PHP peace of code. That peace of code is failing for some reason. I can see the pictures, but there is no link when you try to click on them... Quote Link to comment Share on other sites More sharing options...
haku Posted December 8, 2010 Share Posted December 8, 2010 If you are having an HTML problem, then the PHP is irrelevant. Only the HTML output is relevant. Quote Link to comment Share on other sites More sharing options...
budimir Posted December 8, 2010 Author Share Posted December 8, 2010 OK, so, When I click view source, this is what I get, but when I try to click on it, nothing happens. <p align="center"> <a href="korisnici.php"><img src="images/korisnici.gif" width="118" height="13" alt="korisnici"></a><a href='clanovi.php'><img src='images/clanovi.gif' width='118' height='13' alt='clanovi'></a><a href='upload.php'><img src='images/upload.gif' width='118' height='13' alt='upload'></a><a href='vijesti.php'><img src='images/vijest.gif' width='118' height='13' alt='vijest'></a><a href='natjecanja.php'><img src='images/natje.gif' width='118' height='13' alt='natjecanja'></a><a href='newsletter.php'><img src='images/newsletter.gif' width='118' height='13' alt='newsletter'></a> </p> Any ideas? Quote Link to comment Share on other sites More sharing options...
haku Posted December 9, 2010 Share Posted December 9, 2010 Are you using any relative/absolute positioning in your CSS? You may have positioned an element over top of the links. Quote Link to comment Share on other sites More sharing options...
budimir Posted December 9, 2010 Author Share Posted December 9, 2010 That was the problem, haku! Thank you very much! Quote Link to comment 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.