justAnoob Posted June 15, 2009 Share Posted June 15, 2009 <?php if(!$freak) { echo '<div id="apDiv14"><a href="messages.php"><img src="images/messages_btn.png" width="77" height="20" border="0"></a></div>'; } else { echo '<div id="apDiv14_a"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/ Share on other sites More sharing options...
Adam Posted June 15, 2009 Share Posted June 15, 2009 There's no reason why it shouldn't work in Firefox if it does in IE. Are you getting any errors? Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856546 Share on other sites More sharing options...
justAnoob Posted June 15, 2009 Author Share Posted June 15, 2009 No errors at all. I can't get the link to work. I'm not getting the little finger cursor when I roll over it. Therefore no link. Here is the whole script. It shows all three buttons, two work great, and the other does nothing. (but like I mentioned, everything works fine in IE) I even commented out the if else, still the link will not work. I have session start at the top of the page also. <?php include "connection.php"; if(isset($_SESSION['id'])) { $fluke = $_SESSION['id']; $flip = ("SELECT id FROM member_messages WHERE status = 'NEW' and sendto = '" . $fluke . "'"); $flop = mysql_query($flip); $freak = mysql_num_rows($flop); if(isset($_SESSION['auth'])) { //if(!$freak) //{ echo '<div id="apDiv14"><a href="messages.php"><img src="images/messages_btn.png" width="77" height="20" border="0"></a></div>'; //} //else //{ // echo '<div id="apDiv14_a"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>'; //} echo '<div id="apDiv13"><a href="postnew.php"><img src="images/postnew_btn.png" width="136" height="17" border="0"></a></div>'; echo '<div id="apDiv10"><a href="mypics.php"><img src="images/mypics_btn.png" width="91" height="20" border="0"></a></div>'; } } ?> the if else works fine, i checked it out.(if user has new message, it shows a different pic) just the a href is not working which is strange cause the other 2 work just fine. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856553 Share on other sites More sharing options...
megaresp Posted June 15, 2009 Share Posted June 15, 2009 Please supply the URL so I can have a look at the actual page. I'd like to test a theory. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856560 Share on other sites More sharing options...
justAnoob Posted June 15, 2009 Author Share Posted June 15, 2009 may i ask what that theory is? I really do not want to give out the page until I know everything is secure. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856564 Share on other sites More sharing options...
megaresp Posted June 15, 2009 Share Posted June 15, 2009 may i ask what that theory is? I really do not want to give out the page until I know everything is secure. I want to verify the image actually exists at the path you've specified, and want to view the actual source code to see if it contains a typo that hasn't shown up in your post. And look at the CSS to see if there's a problem with that. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856567 Share on other sites More sharing options...
justAnoob Posted June 15, 2009 Author Share Posted June 15, 2009 if i echo the links without the div and css, they work (of course the link is not placed where it should be on the page, but just to check) here it is below, i changed the names of the class. #noMessage { position:absolute; width:77px; height:20px; z-index:3; left: 821px; top: 112px; } #newMessage { position:absolute; width:77px; height:20px; z-index:3; left: 821px; top: 112px; } if(!$freak) { echo '<div id="noMessage"><a href="messages.php"><img src="images/messages_btn.png" width="77" height="20" border="0"></a></div>'; } else { echo '<div id="newMessage"><a href="messages.php"><img src="images/messages_btn_new.png" width="77" height="20" border="0"></a></div>'; } Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856595 Share on other sites More sharing options...
megaresp Posted June 15, 2009 Share Posted June 15, 2009 I note you're using position:absolute. Have you tried a z-index of 255 on the one that's not working? If you do this, and it starts working, does the other stop working? Also, have you tried it in IE8 to see if it works? I've only had IE8 a few days, but so far it seems closer to FF than IE7...and nothing like IE6. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856656 Share on other sites More sharing options...
haku Posted June 16, 2009 Share Posted June 16, 2009 It could very well be a z-index thing. Without a live page, it's hard to say. But since you don't want to give a live page, how about showing us the HTML output (view source) for that section. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856724 Share on other sites More sharing options...
justAnoob Posted June 16, 2009 Author Share Posted June 16, 2009 I just noticed that the link does work,, but you have to click on the picture at the very bottom left hand corner for the hand cursor to appear for the link to work. I have three picures there. All displayed the same way. Why would one just give me trouble? Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856781 Share on other sites More sharing options...
justAnoob Posted June 16, 2009 Author Share Posted June 16, 2009 ok, got it to work. changed it to relative and z index of 255. Everything seems to be ok. I'm still confused. i read up on z-index and stacking order, but it still confuses me a little. I read about the stacking, but the only other thing that would be stacked there is the other pic and a background image. So by raising the z-index, i brought the link up to the top above the other image and the background???????? If that is right, should I raise the z-index of everything that I want accessible to my users? Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856782 Share on other sites More sharing options...
justAnoob Posted June 16, 2009 Author Share Posted June 16, 2009 found a good example, but still confused. http://tjkdesign.com/articles/z-index/teach_yourself_how_elements_stack.asp Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856795 Share on other sites More sharing options...
haku Posted June 16, 2009 Share Posted June 16, 2009 Honestly, if you design your layout well, you almost never have to use z-index. I've used it maybe once in the last couple years. But again, without a link there isnt much we can say. Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-856807 Share on other sites More sharing options...
megaresp Posted June 16, 2009 Share Posted June 16, 2009 I have to agree with Haku. I hardly ever use z-index, or position absolute for that matter. I'm glad you got it working. Sometimes the differences between browsers can be *ahem* character building Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-857333 Share on other sites More sharing options...
justAnoob Posted June 17, 2009 Author Share Posted June 17, 2009 I haven't tried it yet, so sorry for asking, but from what you said, can I just use relative position with no z-index? Quote Link to comment https://forums.phpfreaks.com/topic/162282-solved-why-does-this-work-in-ie-but-not-ff/#findComment-857723 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.