Darkmatter5 Posted January 22, 2009 Share Posted January 22, 2009 I have this code inside a <td> in a table. foreach(glob("images/logos/g" .$item. "*-small.png") as $filename) { echo "<img src='$filename'> "; } The images aren't being displayed horizontally they are stacking vertically. Why are they not display in a line, horizontally? Quote Link to comment https://forums.phpfreaks.com/topic/142010-solved-help-with-vertically-stacked-images-they-need-to-be-horizontally-displayed/ Share on other sites More sharing options...
DeanWhitehouse Posted January 22, 2009 Share Posted January 22, 2009 Because they are images and will go to the next line depending on image size i believe. Quote Link to comment https://forums.phpfreaks.com/topic/142010-solved-help-with-vertically-stacked-images-they-need-to-be-horizontally-displayed/#findComment-743587 Share on other sites More sharing options...
premiso Posted January 22, 2009 Share Posted January 22, 2009 You have to use CSS to prevent them from breaking. Not sure of the code but that is where you want to look. Display:inline; may be the attribute, but not sure. Quote Link to comment https://forums.phpfreaks.com/topic/142010-solved-help-with-vertically-stacked-images-they-need-to-be-horizontally-displayed/#findComment-743589 Share on other sites More sharing options...
Darkmatter5 Posted January 22, 2009 Author Share Posted January 22, 2009 Yep style='display: inline; worked great! Quote Link to comment https://forums.phpfreaks.com/topic/142010-solved-help-with-vertically-stacked-images-they-need-to-be-horizontally-displayed/#findComment-743597 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.