I want to control when to put figures on a new line in php. I can keep posting figures like so:
<A HREF="./images_local/figname.gif">
<img height=196 width=128 src="./images_local/figname.gif"/></A>
<A HREF="./images_local/figname2.gif">
<img height=196 width=128 src="./images_local/figname2.gif"/></A>
<A HREF="./images_local/figname3.gif">
<img height=196 width=128 src="./images_local/figname3.gif"/></A>
But they all post left to right, until they run out of space, at which point they begin a new line. How do I control when to start posting those figures on a new line?
Thanks.
It is a simple HTML issue and has nothing to do with php, but even if you code HTML in php you could just use the <br>
tag for line break.
By the way, it is considered a good practice to keep all HTML tags (<a>
) and attributes (href=""
) in lower case. It just makes your code more readable and consistent with proper HTML markup recommendations. :)
as mentioned above, the <br>
works just fine, alternatively you can list your images with :
<ul><li><A HREF="./images_local/figname.gif"></li>
<li><img height=196 width=128 src="./images_local/figname.gif"/></A>
<A HREF="./images_local/figname2.gif">
<img height=196 width=128 src="./images_local/figname2.gif"/></A>
<A HREF="./images_local/figname3.gif">
<img height=196 width=128 src="./images_local/figname3.gif"/></A></li>
</ul>
etc