Having a strange rendering issue with Safari:
I have a table inside a div. Inside the table
I have lots of div's floated left. So the normal display is all of the divs within the td stacked up to the left until they fill the width, then flow to the next line, and so forth. So something like this:
|===========================|
| |---------------------| |
| | XXX XXX XXX XXX | |
| | XXX XXX | |
| | | |
| |---------------------- |
|===========================|
That works in all browsers except safari/webkit, where it ends up something like this:
|===========================|
| |-------------------------------|
| | XXX XXX XXX XXX XXX XXX |
| | |
| |-------------------------------|
|===========================|
Update: Finally figured out the issue: my inner divs (the "XXX"s) had white-space: nowrap. Apparently webkit was no-wrap'ing the entire list of divs instead of applying the nowrap within the div.
That was a nasty one.
(This had nothing to do with display:none) You can pop a public demo up on jsbin.com - just include the HTML snippet that relates to your code and the CSS. Hit save and the URL you get people can debug it.
以上就是Safari/WebKit table over-run when using whitespace: nowrap的详细内容,更多请关注web前端其它相关文章!