Commit 14951c0
Add 'table-layout: fixed' to book's CSS in Ch. 15
This commit adds a line -- 'table-layout:fixed' -- to the
'.background' CSS displayed in the book's Chapter 15 ('Project: A
Platform Game'). This line is required in order for the game to
function properly in Google Chrome (at least versions 38 and 39). If
the line is not included, Google Chrome's table layout algorithm can
alter the size of the table cells constituting the game's background,
resulting in buggy behavior (e.g., the player will 'hit' walls before
the player icon is actually touching a displayed wall).
The relevant line is already included in the downloadable code for the
book. This commit simply adds it, together with a brief explanation, to
the CSS displayed in the book text, so that readers who are typing
along with the book will end up with a working game.1 parent 1eb3c8f commit 14951c0
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
492 | 493 | | |
493 | 494 | | |
494 | 495 | | |
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
498 | | - | |
| 499 | + | |
499 | 500 | | |
500 | | - | |
501 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
| |||
0 commit comments