Placing pictures in tables
I run a class of undergraduate students in online journalism. Last week we began experimenting with HTML tables and several of the group came up with issues. The plan was to create a two-column table with the text in the left-hand column and image in the right-hand column.
One issue is that while the image fits nicely in the right hand column, the text is badly affected in the left, and aligns to the bottom of the cell
Is there a small bit of code we can add to the table to stop the text behaving so?
The blog I need help with is journalismatleedsmetropolitan.com.
This is happening because of the default vertical alignment of images. You need to turn all of these:
You also need to turn this:
(The border attribute, as well as several other table attributes you’ll find in table tutorials or table generators, is outdated coding that doesn’t work on newer themes. Newer themes have a default styling for tables, which may or may not include borders, and changing this requires a different approach.)
Do like this
<img src=”picture1.png” align=”RIGHT”>
The topic ‘Placing pictures in tables’ is closed to new replies.