Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用jQuery调整HTML表单元格宽度_Jquery_Html_Css - Fatal编程技术网

使用jQuery调整HTML表单元格宽度

使用jQuery调整HTML表单元格宽度,jquery,html,css,Jquery,Html,Css,我有如下所示的HTML表。它有七列。我正在使用jQuery调整表单元格的宽度。jQuery中的总百分比为100。但是,该表没有占用完整的空间;有一些未使用的空间。如何纠正这一点 将以下属性添加到表元素中 width="100%" 将以下属性添加到表元素中 width="100%" 给你: <table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdTaxAssociates" styl

我有如下所示的HTML表。它有七列。我正在使用jQuery调整表单元格的宽度。jQuery中的总百分比为100。但是,该表没有占用完整的空间;有一些未使用的空间。如何纠正这一点


将以下属性添加到表元素中

width="100%"

将以下属性添加到表元素中

width="100%"
给你:

<table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdTaxAssociates" style="border-collapse: collapse; width:100%;">

给你:

<table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdTaxAssociates" style="border-collapse: collapse; width:100%;">

仅通过在下面的位置使用内联css将宽度设置为100%

<table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdTaxAssociates"
                    style="border-collapse: collapse;width:100%;">


在下面的位置使用内联css,仅将宽度设置为100%

<table class="resultGridTable" cellspacing="0" id="detailContentPlaceholder_grdTaxAssociates"
                    style="border-collapse: collapse;width:100%;">


在jquery而不是css中这样做有什么原因吗?问题可能是因为表本身必须是宽度:100%在jquery而不是css中这样做有什么原因吗?问题可能是因为表本身必须是宽度:100%