I’ve tried doing this, but it seems to just be ignored. I found a few articles saying that if you wanted to do this then you had to make sure that the parent object was also 100%. I have the following:
我試過這樣做,但似乎只是被忽略了。我發現有一些文章說如果你想這樣做,那么你必須確保父對象也是100%。我有以下內容:
Untitled Page.MasterStyle
{
width: 98%;
height: 100%;
}
.ContentStyle
{
width: 100%;
}
.TableStyle
{
width: 133px;
height: 100%;
}
Style="text-align:right" Width="100%" />
I have a border around the table and can see that it’s not filling the height. Can anyone tell me why I’m not getting 100% height? 我在桌子周圍有一個邊框,可以看到它沒有填滿高度。誰能告訴我為什么我沒有達到100%的高度? 2 个解决方案 #1 6 I believe this is also browser dependant, the implementations vary a little bit... But try setting to a height of 100 % as well, since it is the element surrounding . The hierarchy is html > body > table, if the outermost element is not set to 100%, the inner ones can not get any bigger.我相信這也是依賴於瀏覽器的,實現方式有所不同......但是嘗試將設置為100%的高度,因為它是圍繞的元素。層次結構是html> body> table,如果最外層元素未設置為100%,則內部元素不能更大。 Edit: Looking closer at your source code, I believe that your table is actually sitting at html > body > form > table, so maybe you nee to set the form height to 100 %, too. And I noticed that your is set to 100 %, better remove that, since is not part of the hierarchy of your table. You never how setting a height for might confuse a rendering engine...編輯:仔細看看你的源代碼,我相信你的表實際上是坐在html> body> form> table,所以也許你需要將表單高度設置為100%。我注意到你的設置為100%,最好刪除它,因為不是表格層次結構的一部分。你永遠不會如何設置的高度可能會混淆渲染引擎...... #2 2 看看這個網站,希望它有所幫助:http://apptools.com/examples/tableheight.php |