Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent a single row of <img> from turning into 2 rows after a zoom in

Tags:

html

My ducks. I want to keep them in a row. However, when I zoom in, they smash together and make two rows. What can I do to have them simply not show/stay in one row when zoomed in instead?

Code is here, these ducks live in a 2x1 table

<table>
<tr>
  <td>Check out deez ducks:</td>
  <td><img src="http://www.mapleleaffarms.com/lib/sitefiles/White-Duck_Facing_Front.jpg" height="150" width="96"><img src="http://www.mapleleaffarms.com/lib/sitefiles/White-Duck_Facing_Front.jpg" height="150" width="96"><img src="http://www.mapleleaffarms.com/lib/sitefiles/White-Duck_Facing_Front.jpg" height="150" width="96"><img src="http://www.mapleleaffarms.com/lib/sitefiles/White-Duck_Facing_Front.jpg" height="150" width="96"><img src="http://www.mapleleaffarms.com/lib/sitefiles/White-Duck_Facing_Front.jpg" height="150" width="96"></td>
</tr>
</table>

https://jsfiddle.net/myn2qarf/

Gif of problem: http://imgur.com/a/E5blp


EDIT: Found the answer, needed to add "nowrap" to the td containing the ducks. So, if before I had:

<td> *Ducks go here* </td>

I ended up needing

<td nowrap> *Ducks go here* </td>
like image 557
Nate Avatar asked Oct 18 '22 13:10

Nate


1 Answers

Set the width of the image in percentage. 20% seems to work nice in this case.

like image 118
Sherin Binu Avatar answered Nov 15 '22 10:11

Sherin Binu