Le 19 juil. 2013 à 10:05, Micky Hulse <mickyhulse.li...@gmail.com> a écrit :

> Hey Philippe, any idea why Safari doesn't mind obeying max-width on a
> <table> and Firefox does? See second example on this test page:
> <http://jsbin.com/eruxew/2>

You mean on the table at the bottom?
Safari is a little more aggressive in allowing the max-width to kick in. It has 
been a while since I last checked the complexities of width computations on the 
<table> element; but I think Safari/WebKit/Blink are little bit too aggressive 
here, although in situation such as this one, it is useful. Opera (Presto) does 
the same as Firefox.

Basically the width of the cell is based on the intrinsic width of the image; 
the max-width on the img never kicks in (it remains undefined in Fx in this 
case). Even setting table { table-layout: fixed; } doesn't help. But 
additionally setting a width:100% makes it all work (when the image is larger 
than the viewport width). But then, that defeats what you are trying to do…

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to