Skip to main content
1 of 2
Joachim
  • 9k
  • 2
  • 21
  • 67

Control width of table cell

I often use tables to improve posts with many and/or large images: it makes it easier for the reader to get an overview of a given situation, it effortlessly turns the images into links so their original sizes can be seen if the reader wishes so, and it just makes it more pleasing to look at.

When there is an uneven amount of images, or another reason to maintain a certain width or height or ratio, I often resort to use the HTML non-breaking space character   to even out adjacent cells.
E.g., assuming image 1 is taller than image 2, and I want to level their heights, I could do this:

|--------------|--------------------------------------------------------------------|
|[![img][1]][1]|[![img][2]][2]         |

Would it be possible to control the relative width of the individual cells using those dashes?

This, for example:

|10 dashes |20 dashes           |
|----------|--------------------|

would return this:

one length two lengths                     

And if not this, could something similarly easy be implemented to easily control the width of a table cell?

Joachim
  • 9k
  • 2
  • 21
  • 67