2016-02-14 107 views
2

我想要並排顯示一張桌子,一張iframe和一張桌子。有沒有休息或之間的任何事情。我希望所有三個中心最好。並排顯示一張桌子,一個iframe和一張桌子

這沒有任何意義。在我的屏幕顯示足夠大的情況下,在同一「線路」上可以顯示足夠的空間。

請幫忙。如下圖所示

代碼:

<center> 
 

 

 

 

 
<table border="0"> 
 
<tr id="hidethis" style="display:none;"> 
 
<td><iframe src="menu.html"height=450 width=400 frameborder=0 name = "list" style =""></></iframe></td> 
 
</tr> 
 
<tr id="hidethisalso" style="display:none;"> 
 
<td>Enter code for song to play</td> 
 
</tr> 
 
</table> 
 

 

 

 

 

 
<iframe height=450 width=450 frameborder=0 name = "cake" style =""></></iframe> 
 

 

 

 
<table border="0"> 
 
<tr id="hidethistoo" style="display:none;"> 
 
<td><iframe src="menu.html"height=450 width=400 frameborder=0 name = "list" style =""></></iframe></td> 
 
</tr> 
 
<tr id="hidethisaswell" style="display:none;"> 
 
<td>Enter code for song to delete</td> 
 
</tr> 
 
</table> 
 

 
</center>

+0

你可以嘗試將每個表格包裝在它自己的div中,它具有樣式'display:inline-block' –

+0

你知道一種只使用Javascript和HTML的方式 - 不使用CSS。無論如何,感謝您的幫助。謝謝你的時間。 – miasweb

+0

你有內聯的CSS,爲什麼解決方案不能做到這一點? –

回答

0

裹在<div style="inline-block">...</div>

表這將使表的行爲對你

<center> 
 
<!-- wrap the table in an inline-block to make it behave --> 
 
<div style="display:inline-block"> 
 
<table border="0"> 
 
<tr id="hidethis" style="display:;"> 
 
<td><iframe src="menu.html"height=450 width=400 frameborder=0 name = "list" style =""></></iframe></td> 
 
</tr> 
 
<tr id="hidethisalso" style="display:none;"> 
 
<td>Enter code for song to play</td> 
 
</tr> 
 
</table> 
 
</div> 
 
<iframe height=450 width=450 frameborder=0 name = "cake" style =""></></iframe> 
 
<!-- wrap the table in an inline-block to make it behave --> 
 
<div style="display:inline-block"> 
 
<table border="0"> 
 
<tr id="hidethistoo" style="display:;"> 
 
<td><iframe src="menu.html"height=450 width=400 frameborder=0 name = "list" style =""></></iframe></td> 
 
</tr> 
 
<tr id="hidethisaswell" style="display:none;"> 
 
<td>Enter code for song to delete</td> 
 
</tr> 
 
</table> 
 
</div> 
 
</center>

+0

Perfecto。乾杯Jaromanda X. – miasweb