Learning path › Lesson 5
Images
Goal: put an image in a cell, align it and choose its size.
You make a product sheet: picture on the left, information on the right.
The image buttons
You find them on the
Cell (C) tab.
First click the cell where the image should go.
Add image: choose a file (png, jpg, gif or bmp).
image on the left, in the centre or on the right of the cell.
Image size: Original size,
Fit to cell (without distortion) or Stretch (fills the whole cell).
Delete image: removes the image from the cell.
Make it yourself
- Make a table of 3 columns and 5 rows. Merge the top row for the title.
- In the first column merge the cells of rows 2 to 5: that is where the image goes.
- Make the first column wide enough (drag in the column headers) and the rows high enough.
- Click the large cell and click
Add image.
Choose the file appel.pngin the folderlessen\afbeeldingen. - Click
to centre the image. - Type the details in the other cells: variety, origin, price and season.
Where does the image go? The designer keeps a copy in the
html\images folder
next to the program, so your design keeps working if you move the original. In the HTML code the image itself is
built in: your web page is a single file, without separate images.Which image should you choose?
- Use a small image: a photo from your phone is far too big for a cell and makes the page heavy.
- A png with a transparent background fits nicely on any cell colour.
- Only use images you made yourself or are allowed to use.
Exercise
Turn it into a product sheet for a pear: replace the image with peer.png from the folder
lessen\afbeeldingen and change the text. Then try Stretch: what goes wrong?
Solution
Click the cell with the apple and click Add image: the new image replaces the old one.
Choose peer.png and change the variety (e.g. Conference), price and title. With Stretch the
image is stretched over the whole cell: the pear becomes wider and looks distorted. So choose Fit to cell
when the image does not fit in the cell.
Working on Linux? Then open the example yourself with Open table designer: folder
lessen/en, file les05-productfiche.htd.