简体   繁体   English

使用纯HTML(无CSS)时,如何在文本下有一个图像,并且该图像在文本/图像旁边浮动?

[英]With pure HTML (no CSS) how do I have an image under text and an image to float right next to the text/image

My title kind of says it all really. 我的头衔确实说明了一切。 I need to have text (left aligned) with an image underneath and an image to the right in html only (can't use CSS). 我只需要在文本下(左对齐)下面的图像和仅在html中的图像(不能使用CSS)。

I'm a hesitant to share what I've done because you'll probably laugh but here is what I have (I'm not a developer, so bear with me). 我犹豫要分享我所做的事情,因为您可能会笑,但这就是我所拥有的(我不是开发人员,所以请耐心等待)。

在这里查看

i have to guess what you want. 我必须猜你想要什么。 but either way, the best way to do this is with tables . 但无论哪种方式,最好的方法是使用tables so here are some solutions 所以这是一些解决方案

  1. if you can write inline and if you want the image to the right, to be to the right of both text and image under it. 如果您可以内联书写,并且您希望图像在右边,则该文本和下面的图像都在右边。

 <table> <tr> <td style="padding-left:10px;">TEXT HERE<br /> TEXT HERE<br /> TEXT HERE</td> <td rowspan="2" style="vertical-align:top"><img src="http://placehold.it/350x150"></td> </tr> <tr> <td><img src="http://placehold.it/250x150"></td> </tr> </table> 

  1. if you cant write inline and if you want the image to the right, to be to the right of the text only ( you can move it on the next row if you want it to be on the right of the other image ) 如果您不能内联书写,并且希望图像在右侧,则只能在文本的右侧(如果希望图像在另一图像的右侧,则可以将其移动到下一行)

 <table> <tr> <td>TEXT HERE<br /> TEXT HERE<br /> TEXT HERE</td> <td><img src="http://placehold.it/350x150"></td> </tr> <tr> <td><img src="http://placehold.it/250x150"></td> </tr> </table> 

let me know if one of these is what you actually want 让我知道其中之一是否是您真正想要的

Please use table format. 请使用表格格式。 each td add text and image in next td. 每个td在下一个td中添加文本和图像。 that is pure html way. 那是纯HTML方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM