MDanz Posted October 2, 2009 Share Posted October 2, 2009 i echo the variable $latest alone and it gives me the hyperlink that i want.. but when i assign it to this <div> echo "<div class=\"rollover\"><a href='$latest'></div>"; it doesn't display at all.. and i have one identical to this that works... <div class=\"rolloverz\"><a href='info.php?id=$id'></div> i have no idea why it isn't working.. heres the div class rollover.. nothing is wrong with this though... <style type="text/css"> .rollover a { float: left; width: 35px; height: 17px; background: url("http://www.fdsff.com/lastreply.jpg"); text-decoration: none; } .rollover a:hover { background: url("http://www.balshs.com/lastreply2.jpg"); } </style> please help Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/ Share on other sites More sharing options...
Bricktop Posted October 2, 2009 Share Posted October 2, 2009 Hi MDanz, echo "<div class=\"rollover\"><a href='$latest'></div>"; The div class here is called "rollover", but here: <div class=\"rolloverz\"><a href='info.php?id=$id'></div> it's called "rolloverz". Also, you're not closing either link with the </a> tag. Hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929088 Share on other sites More sharing options...
MDanz Posted October 2, 2009 Author Share Posted October 2, 2009 yea they are two different classes.. this is mind boggling to me it should work.. when i echo the variable alone i get the link in text.. i just found out when i assign a hyperlink to it.. then it acts up... its in TEXT type in mysql... like this http://www.gfddhd.com/topic.php?id=44?page=2 Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929094 Share on other sites More sharing options...
PFMaBiSmAd Posted October 2, 2009 Share Posted October 2, 2009 Is the link present in the HTML "view source" of the page in your browser? If it is, then you have a CSS problem. Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929099 Share on other sites More sharing options...
wshell Posted October 2, 2009 Share Posted October 2, 2009 yea they are two different classes.. Right.. but the name of the class in your div must match the name of the class in your CSS definition. It's one class, with one element assuming that classes properties. Give it a try. Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929101 Share on other sites More sharing options...
Bricktop Posted October 2, 2009 Share Posted October 2, 2009 Hi MDanz, Have you tried applying "rolloverz" to the div, as you have said that works for the other link? Also, remember to close your href with </a>! Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929102 Share on other sites More sharing options...
MDanz Posted October 2, 2009 Author Share Posted October 2, 2009 thx got it working.. realised for some there isn't a latest.. so thats why its blank :-\ thx again Quote Link to comment https://forums.phpfreaks.com/topic/176290-solved-very-wierd-echo-problem/#findComment-929104 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.