0

I am encountering the same frustrating problem that has been asked here a few times:

Fluid images in IE and FireFox (max-width)

Why doesn't IE respect table width with fluid image child

Both of these solutions offer the "table-layout:fixed;" solution.

However in my case, I am helping a friend who runs a simple multi-user wordpress site, and has a few extra restrictions:

  1. It needs users to be able to format bulk image posts with very little HTML knowledge.
  2. Image posts are done via a widget that reformats [img] into a linked image. Unfortunately there is no alternative to this.

I suggested the below code, which works very cleanly in Chrome and Safari:

<table class=" aligncenter" width="95%" cellpadding="3">
<tr>
<td>[img]Image 1[/img]</td>
<td>[img]Image 2[/img]</td>
<td>[img]Image 3[/img]</td>
<td>[img]Image 4[/img]</td>
<td>[img]Image 5[/img]</td>
</tr>
</table>

The desired outcome that works in Chrome and Safari is like this

However IE and Firefox show it like this

I had hoped I could just toss a 'style="table-layout:fixed;"' into the table tag, but of course life isn't that simple. I even tried adding it to each tr and td tag, but this produced zero change.

Is there any other way to force IE and Firefox to get images to respect table width and resize accordingly?

Or is there another way to do this with a div-based architecture instead?

Very frustrating, and having no stylesheet access is very handcuffing, but I expect there must be a way.

Thanks in advance!!

Community
  • 1
  • 1
Alex
  • 1
  • 1
  • Yeah, this isn't really tabular data, so tables aren't appropriate for layout. – isherwood Oct 27 '15 at 15:15
  • What's a better alternative? I'm no coder, just a guy who knows enough to get himself in trouble. – Alex Oct 27 '15 at 16:26
  • Best practice is to not use tables for layout. Use them for presentation of (mostly) textual data. In this case, there are many good examples of gallery layouts to be found. Have a look for one you like and examine its structure with your browser's inspector. – isherwood Oct 27 '15 at 17:34

0 Answers0