Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Center Image Within Text
June 14, 2015, 12:58 am
rate this thread
text? I have a site I'm building that has a lot of narrative, along
with a few pictures. I'm now using tables (with <td>/</td> pairs) so
that the text is either on the left or right and the image on the left
or right. It's okay, but I'd like to put the image in the center of the
text if possible.
Please advise. TIA
This email has been checked for viruses by Avast antivirus software.
Re: Center Image Within Text
If you want a text to flow around a centred image then, the human eyes is
not build to jump over the image and catch the continuating text line on the
other side of the image, not without to stress the eyes. You can separate
the text in different columns (as others pointed out), one on each side of
the image. Such that all text in left collumn is read before the reader goes
to read the right column. That said: When placing an image in a text-field,
then text will automatically flow around beneath the image. But it will not
flow upward in the horizontal area that is left or right of the image (only
area that is left or right BENEATH). Whether flow is left or right can be
controlled with text-align: left; or text-align:right;
Also, if you have text-align:left, then text in the same container as are
the image, must come before the image. if so, remarkably, the image
pushes the text behind itself. The part of the text not room for behind the
image, will then flow down the bottom of the image and continue to
flow left all the way left to the containers left side, or to where, if the
container has a left padding setting. But you cannot force it upward
from there. You can change this behaviour by putting text and image
in separate containers and layout these two as columns.