deansaddigh Posted November 19, 2009 Share Posted November 19, 2009 as above. Here is my css code: img.floatLeft { float: left; margin: 4px; } here is my html/php echo '<p>'; echo $productdescription = $row['ProductDescription']; echo '</p>'; $imagename = $row["ImageName"]; $imagepath = $row["ImagePath"]; $file = $imagepath.$imagename; echo 'Hover over image to enlarge'; echo '<td><img src="'.$file.'" class="floatLeft" data-zoomsrc="'.$file.'" width="200" height="200"/></td>';?> Basically i want the image to float to the left of the product description but its not working any ideas? Quote Link to comment Share on other sites More sharing options...
noober Posted November 19, 2009 Share Posted November 19, 2009 Everything looks ok here, do you have a link to the page. Is it online? Quote Link to comment Share on other sites More sharing options...
haku Posted November 20, 2009 Share Posted November 20, 2009 When asking for CSS help, please show us the outputted HTML rather than showing us the PHP. The PHP doesn't really matter. Quote Link to comment Share on other sites More sharing options...
JustLikeIcarus Posted November 20, 2009 Share Posted November 20, 2009 Your image file needs to be before any of the text you want to have wrap around it. When an item is floated its positioned within the normal flow, then taken out and repositioned. Anything coming before the floated item will have an effect especially when floating to the left. Your CSS looks fine. Just move your image to the begining of the text and all should be good. 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.