Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
如何动态设置included.html文件的宽度_Html_Css_Jsp_Templates - Fatal编程技术网

如何动态设置included.html文件的宽度

如何动态设置included.html文件的宽度,html,css,jsp,templates,Html,Css,Jsp,Templates,我已经设计了主页,并将其作为一个单独的index.html文件,我有很多 其他页面 这些页面执行一些操作,但我还没有为这些页面设计UI。 我在所有这些页面中都包含了index.html文件。现在我得到了背景 但是,当我增加某个页面内容的宽度时,宽度会增加,但index.html的宽度不会应用 它看起来像这样 -------------------- | index.html | | -------------------- | | | | |

我已经设计了主页,并将其作为一个单独的index.html文件,我有很多 其他页面

这些页面执行一些操作,但我还没有为这些页面设计UI。 我在所有这些页面中都包含了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,我知道如何使用它来获得正确的布局

我觉得你的索引页有固定的宽度

为了解决这个问题,我将这样做:

  • 确保索引页的宽度属性设置为“自动”。 请注意,如果包含的页面不是绝对的或固定的,则包含的页面将决定两者的宽度
  • 其他需要注意的事项:

  • 如果没有包含的页面具有宽度或任何内容,它可能不会显示任何内容,因为此时宽度将为0
  • 可以在插入另一页的索引页的左侧和右侧设置填充。为了让它看起来更好,否则它看起来就像一件事。这只是一个提示
  • 我建议给索引页一个固定的宽度,您只需将其他页面加载到div或任何您想要更改的标记中。你必须把另一页放进去。把它放进去
    我不是一个JSP“foendi”,但归根结底是html和css,我知道如何使用它来获得正确的布局

    我觉得你的索引页有固定的宽度

    为了解决这个问题,我将这样做:

  • 确保索引页的宽度属性设置为“自动”。 请注意,如果包含的页面不是绝对的或固定的,则包含的页面将决定两者的宽度
  • 其他需要注意的事项:

  • 如果没有包含的页面具有宽度或任何内容,它可能不会显示任何内容,因为此时宽度将为0
  • 可以在插入另一页的索引页的左侧和右侧设置填充。为了让它看起来更好,否则它看起来就像一件事。这只是一个提示
  • 我建议给索引页一个固定的宽度,您只需将其他页面加载到div或任何您想要更改的标记中。你必须把另一页放进去。把它放进去 谢谢大家……) 我终于用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....
    
    同样的,我也适用于宽度,但有一些小的变化

    工作真的很好…

    谢谢大家……) 我终于用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。此外,包含的页面位置属性不应是绝对的或固定的。这样,您就可以通过更改另一页的宽度来调整这两个页面的大小。