开发者

Child element with 100% width for table with auto width columns

I have a HTML table. Table already contains one row with two columns. Columns width are perfect for me. But afterwards using JS I add new row to the table with input element which I want to fill the cell as content for first cell and columns width changed.

Easier to show rather than describ开发者_Go百科e:

Child element with 100% width for table with auto width columns

http://dl.dropbox.com/u/15612314/Layout.png

The question it how to keep previous width for columns without explicit setting width for all columns?

Thanks


You can leverage jquery to acheive this, since you are already using javascript. Ading something this will do:

<script type="text/javascript">
    $(function() {
        $("input:text").css("width", "100%")
    })
</script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜