我如何在我的jsp程序中并排显示图像和多行表 [英] how can i display image and multiple row table side by side in my jsp program
本文介绍了我如何在我的jsp程序中并排显示图像和多行表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用这种编码来并排显示图像和表格..
i tried this coding to display image and table side by side..
<img src="5.jpg" alt="">
<table>
<tr>
<td>hello1</td>
</tr>
<tr>
<td>hello2</td>
</tr>
<tr>
<td>hello3</td>
</tr>
<tr>
<td>hello4</td>
</tr>
</table>
但是它按行给出了输出lin,如下所示.
图片
but it gives output lin by line as follows..
image
hello1
hello2
hello3
hello4
如何在我的jsp程序中并排显示图像和多行表?
how can i display image and multiple row table side by side in my jsp program
推荐答案
最简单的方法是嵌套表:
The simplest way is nested table:
<html><body>
<table>
<tr><td><img alt="some image" src="myImage.png" /></td><td>
<table>
<tr>
<td>hello1</td>
</tr>
<tr>
<td>hello2</td>
</tr>
<tr>
<td>hello3</td>
</tr>
<tr>
<td>hello4</td>
</tr>
</table>
</td></tr>
</table>
</body></html>
当然,为td
添加CSS和相应的padding
属性; margin
和border
属性(如需要)等.
Of course, add CSS and appropriate padding
properties for td
; margin
and border
properties where required, etc.
这篇关于我如何在我的jsp程序中并排显示图像和多行表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文