Richzilla Posted May 11, 2007 Share Posted May 11, 2007 Hi All, Sorry for posting what you might consider a very basic issue, but I've been tearing my hair out for 2 hours on this. In a nutshell I cannot get my rating score images to align horizontally, they keep going vertically, which is not what I want. I have copied my code that is produced from my php script into another page and the images are diaplayed correctly. Annoyingly i cannot for the life of me work out why they are displaying vertically. http://www.jungletekno.co.uk/mixes.php On the right you can see the small images which should be going horizontally. I have tried making them really small to see if taht was the issue. Any ideas what i'm doing wrong? Code is below- code..... $half = "<img src='pictures/half.png' height='5' width='5' />"; $full = "<img src='pictures/full.png' height='5' width='5' />"; $empty = "<img src='pictures/empty.png' height='5' width='5' />"; loads of code between here }else if($rounded_rating > 1 && $rating <= 1.5){ echo $full.$half.$empty.$empty.$empty; { } echo $rounded_rating . $rating_max ?> <br> <? echo $rating_number . $rating_voters ?> <form method="post" action="<? echo $_SERVER['PHP_SELF']; ?>?t=temp"> <p><select name="votes"> <option value="">Choose a Rating</option> <option value="5">I Love It!</option> <option value="4">Good</option> <option value="3">Moderate</option> <option value="2">Not Bad</option> <option value="1">Poor</option> </select><br /> <input type="submit" name="v_submit" value=" Rate It! " /></p> </form> </td> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/50949-annoying-problem-with-ratings-images/ Share on other sites More sharing options...
micah1701 Posted May 11, 2007 Share Posted May 11, 2007 I don't think you have a PHP problem. Your code is not outputting any line breaks and looking at the source code on your site, it looks fine. Perhaps there's something in the table cell properties or CSS that causing the problem? Quote Link to comment https://forums.phpfreaks.com/topic/50949-annoying-problem-with-ratings-images/#findComment-250697 Share on other sites More sharing options...
sasa Posted May 11, 2007 Share Posted May 11, 2007 corecting this line <style type="text/css">td img {display: block;}</style> Quote Link to comment https://forums.phpfreaks.com/topic/50949-annoying-problem-with-ratings-images/#findComment-250721 Share on other sites More sharing options...
Richzilla Posted May 11, 2007 Author Share Posted May 11, 2007 Good spot, sorted it right away. Must be more careful with my css styles!!! Quote Link to comment https://forums.phpfreaks.com/topic/50949-annoying-problem-with-ratings-images/#findComment-250744 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.