将两个下拉列表彼此相邻放置

时间:2021-01-02 19:39:03

How to place two select boxes next to each other inside the table-data of a table and it should also be responsive.

如何在表的数据中放置两个选择框彼此相邻,它也应该是响应的。

Please Help!! Thanks all

请帮忙!!谢谢大家

2 个解决方案

#1


0  

is this what you're talking about?

这就是你在说什么?

CSS:

<table>
<tr>
    <td>
        <select>
            <option>One</option>
            <option>Two</option>
        </select>
        <select>
            <option>One</option>
            <option>Two</option>
        </select>
    </td>
</tr> 
</table>

HTML:

table{
  background: red;
  width: 100%;
}

select{
  width: 50%;
  float: left;
}

JSFIDDLE

#2


0  

Try to use table cols and rows attribute to span your table and rows 

<tr>
    <td><input type="text" ></td>
    <td rowspan=5><textarea rows="10" cols="35"> </textarea></td>       
    <td rowspan=5><textarea rows="10" cols="35"> </textarea></td>   
  </tr>

Something like this I think you can use

我认为你可以使用这样的东西

#1


0  

is this what you're talking about?

这就是你在说什么?

CSS:

<table>
<tr>
    <td>
        <select>
            <option>One</option>
            <option>Two</option>
        </select>
        <select>
            <option>One</option>
            <option>Two</option>
        </select>
    </td>
</tr> 
</table>

HTML:

table{
  background: red;
  width: 100%;
}

select{
  width: 50%;
  float: left;
}

JSFIDDLE

#2


0  

Try to use table cols and rows attribute to span your table and rows 

<tr>
    <td><input type="text" ></td>
    <td rowspan=5><textarea rows="10" cols="35"> </textarea></td>       
    <td rowspan=5><textarea rows="10" cols="35"> </textarea></td>   
  </tr>

Something like this I think you can use

我认为你可以使用这样的东西