如何动态设置included.html文件的宽度
我已经设计了主页,并将其作为一个单独的index.html文件,我有很多 其他页面 这些页面执行一些操作,但我还没有为这些页面设计UI。 我在所有这些页面中都包含了index.html文件。现在我得到了背景 但是,当我增加某个页面内容的宽度时,宽度会增加,但index.html的宽度不会应用 它看起来像这样如何动态设置included.html文件的宽度,html,css,jsp,templates,Html,Css,Jsp,Templates,我已经设计了主页,并将其作为一个单独的index.html文件,我有很多 其他页面 这些页面执行一些操作,但我还没有为这些页面设计UI。 我在所有这些页面中都包含了index.html文件。现在我得到了背景 但是,当我增加某个页面内容的宽度时,宽度会增加,但index.html的宽度不会应用 它看起来像这样 -------------------- | index.html | | -------------------- | | | | |
--------------------
| index.html |
| --------------------
| | |
| | |
| | other page |
| |__________________|
--------------------
当我增加另一个页面的宽度时,index.html页面的宽度也应该增加
我该怎么做
index.html的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<title>X---todo---X</title>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="frame">
<div class="backbody">
<div class="header">
<img src="images/logo.png" class="logo">
<table border="0" class="tabs">
<tbody>
<tr>
<td>
<div class="mitem1"><span class="mitem"><a href="#">mq</a></span>
</div>
</td>
<td>
<div class="mitem1"><span class="mitem"><a href="#">mb</a></span>
</div>
</td>
<td>
<div class="mitem1"><span class="mitem"><a href="#">m6</a></span>
</div>
</td>
<td>
<div class="mitem2"><span class="mitem"><a href="#">ml</a></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="body"></div>
<div class="footer"></div>
</div>
</body>
</html>
我不是一个JSP“foendi”,但归根结底是html和css,我知道如何使用它来获得正确的布局 我觉得你的索引页有固定的宽度 为了解决这个问题,我将这样做:
我不是一个JSP“foendi”,但归根结底是html和css,我知道如何使用它来获得正确的布局 我觉得你的索引页有固定的宽度 为了解决这个问题,我将这样做:
on document ready
step-1 > get the height of particular table
step-2 > add some default given value with height value
step-3 > get the added value and set that value to reset the background height..
it worked quite really good....
同样的,我也适用于宽度,但有一些小的变化
工作真的很好…谢谢大家……)
我终于用jquery找到了解决方案
实际上,jsp页面包含动态扩展的表
当表格动态增加时,背景高度也应增加
因此,我考虑使用jquery动态设置背景高度
我使用的算法是:
on document ready
step-1 > get the height of particular table
step-2 > add some default given value with height value
step-3 > get the added value and set that value to reset the background height..
it worked quite really good....
同样的,我也适用于宽度,但有一些小的变化
工作非常好…请向我们展示您的html和任何相关代码。添加index.html的一些代码以及在其中包含其他页面的方式。如何在索引页面中显示其他页面?你在使用AJAX吗?@Archer我已经编辑了postAnyway。。。如果在索引页中包含其他页,则只需将其宽度属性设置为“自动”。另一页的宽度应为800px。此外,包含的页面位置属性不应是绝对的或固定的。这样,您只需更改另一页的宽度即可调整大小。请向我们显示您的html和任何相关代码。添加index.html的一些代码以及将其他页包含在其中的方式。如何在索引页中显示其他页?你在使用AJAX吗?@Archer我已经编辑了postAnyway。。。如果在索引页中包含其他页,则只需将其宽度属性设置为“自动”。另一页的宽度应为800px。此外,包含的页面位置属性不应是绝对的或固定的。这样,您就可以通过更改另一页的宽度来调整这两个页面的大小。