2012-03-02 57 views
0

我有一個一行和一個單元格的表格。在單元格中有一些文本和另一個表格在那裏。我期待的是內部表格應該在右邊到文本,但它將進入下一行。如何實現這一目標?將內部表對齊到外部表的文本td

這裏是我的代碼...

<!DOCTYPE HTML> 
    <html> 
    <head> 
     <title> New Document </title> 
     <meta name="Generator" content="EditPlus"> 
     <meta name="Author" content=""> 
     <meta name="Keywords" content=""> 
     <meta name="Description" content=""> 
    </head> 

    <body> 
     <table border="1"> 
     <tr> 
     <td> 
      Here is some text 
      <!-- Inner Table. This table should come at right to the above text--> 
      <table style="border:1px solid blue;"> 
      <tr> 
      <td>1</td> 
      <td>Krish</td> 
      </tr> 

      <tr> 
      <td>2</td> 
      <td>Alex</td> 
      </tr> 

      </table> 
     </td> 
     </tr> 
     </table> 

    </body> 
    </html> 
+0

提供您的html – 2012-03-02 14:46:37

回答

1

應指定float:rightfloat:left

根據你的HTML,與指定表float:right作爲

<table style="border:1px solid blue;float:right;">