适合完整的浏览器窗口 [英] Fitting complete browserwindow

查看:60
本文介绍了适合完整的浏览器窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个问题,因为我使用完整的DOCTYPE。


<!DOCTYPE HTML PUBLIC" - / / W3C // DTD HTML 4.01 Transitional // EN">

< html>

< head>

< / head> ;

< body style =" height:100%">

< table cellspacing =" 0" CELLPADDING = QUOT; 0"边界=" 1 QUOT; style =" width:100%;

height:100%;">

< tr style =" height:50px">

< td valign =" top"> header< / td>

< / tr>

< tr style =" height :100%;">

< td valign =" top"> body< / td>

< tr>

< tr style =" height:20px">

< td valign =" top"> footer< / td>

< / tr>

< / table>

< / body>

< / html>


这非常有效。整个内容适合浏览器窗口。当我

将URL添加到DOCTYPE时:


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN" ;

" http://www.w3.org/TR/html4/loose.dtd">


它再也不起作用了与IE6。由于我必须使用后者DOCTYPE我需要一个与第一个samle相同结果的解决方案。

可以onyone帮我这个。


-

再见斯蒂芬......

Hi,

I have a problem since I use a full DOCTYPE.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body style="height:100%">
<table cellspacing="0" cellpadding="0" border="1" style="width:100%;
height:100%;">
<tr style="height:50px">
<td valign="top">header</td>
</tr>
<tr style="height:100%;">
<td valign="top">body</td>
<tr>
<tr style="height:20px">
<td valign="top">footer</td>
</tr>
</table>
</body>
</html>

This works very well. The whole content fits in the browser window. When I
add the URL to the DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

it doesn''t work anymore with IE6. Since I have to use the latter DOCTYPE I
need a solution that leads to the same result as the first samle.
Can onyone help me with this.

--
bye Stephan...

推荐答案



Stephan Koser写道:

Stephan Koser wrote:


我有一个问题,因为我使用完整的DOCTYPE。
<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN">
< html>
< head>
< / head>
< body style =" height:100%">
< table cellspacing =" 0" CELLPADDING = QUOT; 0"边界=" 1 QUOT; style =" width:100%;
height:100%;">
< tr style =" height:50px">
< td valign =" top"> header< / td>
< / tr>
< tr style =" height:100%;">
< td valign =" top" ;> body< / td>
< tr>
< tr style =" height:20px">
< td valign =" top"> footer< / td>
< / tr>
< / table>
< / body>
< / html>

这很有效好。整个内容适合浏览器窗口。当我将URL添加到DOCTYPE时:

<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 Transitional // EN"
" http ://www.w3.org/TR/html4/loose.dtd">

它不再适用于IE6。由于我必须使用后者的DOCTYPE,我需要一个与第一个samle相同结果的解决方案。
可以onyone帮助我。
Hi,

I have a problem since I use a full DOCTYPE.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body style="height:100%">
<table cellspacing="0" cellpadding="0" border="1" style="width:100%;
height:100%;">
<tr style="height:50px">
<td valign="top">header</td>
</tr>
<tr style="height:100%;">
<td valign="top">body</td>
<tr>
<tr style="height:20px">
<td valign="top">footer</td>
</tr>
</table>
</body>
</html>

This works very well. The whole content fits in the browser window. When I
add the URL to the DOCTYPE:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

it doesn''t work anymore with IE6. Since I have to use the latter DOCTYPE I
need a solution that leads to the same result as the first samle.
Can onyone help me with this.




Haven没有调查'适合浏览器窗口'的效果,但

tr的高度不会起作用。 tr没有高度,你需要在bd上设置高度。

-

Els


Mentehumanaécoopára-quedas; funciona melhor aberta。



Haven''t looked into the ''fits in browserwindow'' effect, but
the height on the tr won''t work. tr doesn''t have height, you
have to set height on the td instead.
--
Els

Mente humana é como pára-quedas; funciona melhor aberta.


* Stephan Koser *:
*Stephan Koser*:

<!DOCTYPE HTML PUBLIC" - / / W3C // DTD HTML 4.01 Transitional // EN">
< body style =" height:100%">
< table border =" 1" style =" height:100%;">
< tr style =" height:50px">
< tr style =" height:100%;">
< tr style =" height:20px">

这很有效。整个内容适合浏览器窗口。


嗯,三个词header,body,footer等等。应该适用于几乎任何

浏览器窗口,但是如果有更多的内容不适合''body''s
100%高的盒子怎么办?

当我将URL添加到DOCTYPE(...)时,它不再适用于IE6。


也没有在任何正确实现CSS1 + 2盒子模型的浏览器中。

因为我必须使用后者DOCTYPE


为什么你要*那样做?

我需要一个与第一个samle相同结果的解决方案。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body style="height:100%">
<table border="1" style="height:100%;">
<tr style="height:50px">
<tr style="height:100%;">
<tr style="height:20px">

This works very well. The whole content fits in the browser window.
Well, the three words "header", "body", "footer" should fit in virtually any
browser window, but what if there was more content than fits into ''body''''s
100% high box?
When I add the URL to the DOCTYPE (...) it doesn''t work anymore with IE6.
Nor in any browser which implements the CSS1+2 box model (almost) correctly.
Since I have to use the latter DOCTYPE
Why do you *have to* do that?
I need a solution that leads to the same result as the first samle.




s / tr style =" height:100%;" / tr /


-

无用的事实#10:

访问迪斯尼乐园/迪士尼世界的美国人百分比:70%。



s/tr style="height:100%;"/tr/

--
Useless Fact #10:
Percentage of Americans who have visited Disneyland/Disney World: 70%.


* Els *:



来自REC-CSS2:


''身高''

(...)

适用于:所有元素但未替换的内联元素,

表格列和列组


从HTML 4.01松散DTD(删除评论):


<!ATTLIST TR

%attrs;

%cellhalign;

%cellvalign;

bgcolor%颜色; #IMPLIED
<!ATTLIST(TH | TD)

(...)

width%Length; #IMPLIED

身高%长度; #IMPLIED

the height on the tr won''t work. tr doesn''t have height,
From REC-CSS2:

''height''
(...)
Applies to: all elements but non-replaced inline elements,
table columns, and column groups

From HTML 4.01 Loose DTD (comments removed):

<!ATTLIST TR
%attrs;
%cellhalign;
%cellvalign;
bgcolor %Color; #IMPLIED <!ATTLIST (TH|TD)
(...)
width %Length; #IMPLIED
height %Length; #IMPLIED




我猜想你有些困惑。在HTML4中严格的''th''和''td''不要
也有''height''和''width''属性。


-

现实是由于缺乏酒精而产生的错觉。



You are confusing something, I presume. In HTML4 Strict ''th'' and ''td'' don''t
have ''height'' and ''width'' attributes either.

--
Reality is an illusion that occurs due to the lack of alcohol.


这篇关于适合完整的浏览器窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆