Internet Explorer ignores width when using css table

Hi everyone, I created a js script to illustrate the problem:

http://jsfiddle.net/pLn7qgp7/

It doesn't actually work in Internet Explorer . I set the width to 500px

, but the browser is ignoring that.

I know I can just add the width to the images, but I'm looking for another solution so that the image number can change.

+3


source to share


1 answer


IE is really right. Chrome is wrong.

According to the history of HTML backward compatibility width

on a table (or its cells) really means min-width

. Tables can contain column widths to match content.



Add table-layout:fixed

to an element table

(in this case, your element #wrap

) to force "strict" behavior with respect to width.

+11


source







All Articles