Maybe youโve been reading this blog some time and remember the โrevealโ themed blog posting called HTML/Javascript Reveal Image Behind Image Primer Tutorial? Well, todayโs ESL sentence game has many similarities, except that instead of an image in front of another image, today we use an HTML div element in front of an HTML img element, using Javascript and CSS properties โฆ
- innerHTML โฆ the whole HTML img element becomes the HTML divโs innerHTML
- width and height โฆ set width and height of HTML div but no width nor height specified for HTML image โฆ because โฆ
- overflow โฆ set to โhiddenโ to mask out any overflow of HTML image for overflow to left or right or top or bottom
- margin-left โฆ a negative margin left โpansโ the underneath โtoo bigโ image positionโs X to correct place
- margin-top โฆ a negative margin top โpansโ the โtoo bigโ image positionโs Y to correct place
So todayโs ESL sentence game has the user piece together a โLetโsโ sentence โฆ one that starts with โLetโsโ, or, if one wants to be formal, โLet usโ, that suits the picture โsegmentโ present. At this stage it behoves us to thank โHow English Worksโ by Michael Swan and Catherine Walter for their great ideas to teach English.
The feel of this work also brings to mind the wonderfully effective panning capabilities of good old, often overlooked, Paintbrush image editor, about which you can read Paintbrush Panning Primer Tutorial for further information.
How about you give our ESL sentence game (or HTML source code let_ushtml) a go?
If this was interesting you may be interested in this too.