插入完整doctype后出现问题 [英] Problems after inserting full doctype

查看:69
本文介绍了插入完整doctype后出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用3帧布局构建几个(常见的)数据库驱动的Intranet站点(所以我不能使用
post URL);标题,菜单和主页。

样式和一些定位是通过CSS完成的。


截至昨天,我的页面中的Doctypes不完整:


<!doctype html public" - // w3c // dtd html 4.01 transitional // en">


但现在我已经完整/正确4.01过渡的doctype:


<!doctype html public" - // w3c // dtd html 4.01 transitional // en"

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


但是自从我做了修改后,我遇到了一些问题...


示例:主要输入页面


< div class =" wrapper">

< div class = content>

< h2>简介< / h2>

< p>一些文字。足够自动换行。< / p>

< p>更多文字了。足够自动换行。< / p>

< img id =" MainPic" />

< / div>

< / div>

CSS的相关格式如下:


..content {

宽度:500px;

}

..wrapper {

text-align:center;

}


正文{

等;

SCROLLBAR-BASE-COLOR:#f5f5dc;

等;

}


鉴于这一切,我希望文本在这个页面上是一个500px

宽,左对齐的块,它在框架中居中。 img

也应该在框架中居中。滚动条应该是定制的(在IE中),只有垂直滚动条可见。


相反,文本略高于整个宽度框架和

两个滚动条都是可见的,并且是默认的阴影。其他格式化

如背景/字体颜色等都可以。


许多页面都会出现此问题,大概是出于同样的原因...


我想知道非标准的滚动条样式是否会弄乱东西

uo,但效果与此删除相同......


帮助!我可以很容易地回到半文档声明/怪癖

模式,但我宁愿理解这个问题......


提前致谢


克里斯

解决方案



" CJM" < CJ ***** @ yahoo.co.uk>在消息中写道

新闻:c2 ************************* @ posting.google.co m ... < blockquote class =post_quotes>我正在构建几个(常见的)数据库驱动的内部网站点(所以我不能发布URL),使用3帧布局;标题,菜单和主页。
样式和一些定位是通过CSS完成的。


您正在使用框架开发新网站?真可惜。
直到昨天,我的网页上都有不完整的Doctypes:

<!doctype html public" - // w3c // dtd html 4.01 transitional // en >


是的。这导致一些浏览器在怪异模式下运行。

但现在我有4.01过渡的完整/正确的doctype:

<!doctype html public" - // w3c // dtd html 4.01 transitional // en"
" http://www.w3.org/tr/html4/loose.dtd">


是的。我们现在处于符合标准的模式。浏览器突然不会改变你的HTML,也不会按照旧的错误工作。

但是由于我做了修改,我遇到了一些问题...




就像你想的那样。


将一个例子上传到一个可见的地方并提供URL,而不仅仅是

snippits代码和某人可以帮助你。


干杯

理查德。


< blockquote> cj*****@yahoo.co.uk (CJM)写道:

我正在构建几个(常见的)数据库驱动的内部网站点(所以我不能发布URL),


创建一个示例页面并将其放在上面任何旧的网络空间,

你可能认为有很多东西是无关紧要的,但需要
来解决这个难题。

使用3帧布局;标题,菜单和主页。
样式和一些定位是通过CSS完成的。

直到昨天,我的页面中都有不完整的Doctypes:
<!doctype html public" - / / w3c // dtd html 4.01 transitional // en">


doctype错误。 deoctypes的FPI部分是

敏感的,应该是 - // W3C // DTD HTML 4.01 Transitional // EN

但是现在我有完整/正确的doctype for 4.01 transitional:
<!doctype html public" - // w3c // dtd html 4.01 transitional // en"
" http://www.w3.org/tr/html4/ loose.dtd">


由于与上述相同的原因再次出现问题。然而,浏览器(以及特别是一个浏览器的b $ b $)对于理解doctypes是不好的,所以他们可能会认为它足够接近触发标准模式。

但是,由于我做了更改,我遇到了一些问题...

示例:主要输入页面

< div class =" wrapper">
< div class =" content">
< h2>简介< / h2>
< p>一些文字。足够自动换行。< / p>
< p>更多文字。足够自动换行。< / p>
< img id =" MainPic" />
< / div>
< / div>

CSS的相关格式如下:

.content {
宽度:500px;
}
.wrapper {
text-align:center;
}

身体{
等;
SCROLLBAR-BASE-COLOR:#f5f5dc;
等;


鉴于这一切,我希望此页面上的文字为500px
宽,


同意。但请记住,当从Quirks转移到标准模式时,你需要从破碎的IE盒模型移动到正确的模型。这意味着

填充和边框与宽度交互的方式会发生变化。

左对齐块,


Nope。文本应该是居中对齐的,text-align是继承的。

在框架中居中。


不。 text-align应该对齐内联内容而不是块。

img也应该在框架中居中。


不。它应该在div class =" content中居中。块。

滚动条应该是自定义的(在IE中),


Bleagh。 ;-)

只显示垂直滚动条。


这取决于。

相反,文字略高于框架的整个宽度,


框架的宽度是多少?

和两个滚动条都可见,


当一个在IE6中触发标准模式的页面在框架中时它是

显示没有滚动条或两个滚动条。

并且是默认阴影。




真的吗?我认为彩色滚动条不受

标准模式的影响。也许是因为你在一个框架中....


当您在外面查看页面时会发生什么(宽度,滚动条等)

of它的框架集?


一个URI真的会有所帮助。


史蒂夫


-

我的理论给你起见,我的异端邪说激怒了你,

我从不回信,你不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>


谢谢Steve,


我会尝试和敲了一个演示,然后重新发布。


Chris


I am building several (common) db-driven intranet sites (so I cant
post URL), using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.

Up until yesterday, I had incomplete Doctypes in my pages:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en">

But now I have the full/correct doctype for 4.01 transitional:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">

But since I made the changes, I am having a few problems...

Example: Main entry page

<div class="wrapper">
<div class="content">
<h2>Intro</h2>
<p>Some text. Enough to word-wrap.</p>
<p>Some more text. Enough to word-wrap.</p>
<img id="MainPic" />
</div>
</div>
The relevant formatting from the CSS is as follows:

..content {
width:500px;
}
..wrapper {
text-align:center;
}

Body {
etc;
SCROLLBAR-BASE-COLOR: #f5f5dc;
etc;
}

Given all this, I would expect the text on this page to be a 500px
wide, left-justified block, which is centred within the frame. The img
should also be centred within the frame. The scrollbars should be
customised (in IE), with only the vertical scrollbar visible.

Instead, the text is a little over the full width of the frame, and
both scrollbars are visible, and are default shades. Other formatting
such as background/font colours etc are all OK.

This problem occurs on many pages, presumably for the same reasons...

I wondered if the non-standard scrollbar styling was messing things
uo, but the effect is the same with this removed...

Help! I can easily go back to the half doctype declaration/quirks
mode, but I''d rather understand this problem...

Thanks in advance

Chris

解决方案


"CJM" <cj*****@yahoo.co.uk> wrote in message
news:c2*************************@posting.google.co m...

I am building several (common) db-driven intranet sites (so I cant
post URL), using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.
You are developing a new site using frames? What a pity.
Up until yesterday, I had incomplete Doctypes in my pages:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
Yep. This causes some browsers to function in quirks mode.
But now I have the full/correct doctype for 4.01 transitional:

<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">
Yep. We are now in standards compliant mode. The browser is suddenly not
correcting your HTML nor working as per its old bugs.
But since I made the changes, I am having a few problems...



As you would.

Upload an example to a somewhere visible and provide the URL, not just
snippits of code and somebody may be able to help you.

Cheers
Richard.


cj*****@yahoo.co.uk (CJM) wrote:

I am building several (common) db-driven intranet sites (so I cant
post URL),
Create an example page and put that on any old piece of web space,
there are so many things that you may think are irrelevant but which
are needed to solve the puzzle.
using a 3-frame layout; header, menu & main pages. The
styling and some of the positioning is done via CSS.

Up until yesterday, I had incomplete Doctypes in my pages:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
The doctype is wrong. The FPI portion of the deoctypes is case
sensitive and should be -//W3C//DTD HTML 4.01 Transitional//EN
But now I have the full/correct doctype for 4.01 transitional:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"
"http://www.w3.org/tr/html4/loose.dtd">
Again it''s wrong for the same reason as above. However browsers (and
one browser in particular) are bad at understanding doctypes so they
probably count that as close enough to trigger Standards mode.
But since I made the changes, I am having a few problems...

Example: Main entry page

<div class="wrapper">
<div class="content">
<h2>Intro</h2>
<p>Some text. Enough to word-wrap.</p>
<p>Some more text. Enough to word-wrap.</p>
<img id="MainPic" />
</div>
</div>
The relevant formatting from the CSS is as follows:

.content {
width:500px;
}
.wrapper {
text-align:center;
}

Body {
etc;
SCROLLBAR-BASE-COLOR: #f5f5dc;
etc;
}

Given all this, I would expect the text on this page to be a 500px
wide,
Agreed. But remember that when moving from Quirks to Standard mode you
move from the broken IE box model to the correct one. This means that
the way that padding and borders interact with widths will change.
left-justified block,
Nope. The text should be center justified, text-align is inherited.
which is centred within the frame.
Nope. text-align should align inline content not blocks.
The img should also be centred within the frame.
Nope. It should be centered within the div class="content" block.
The scrollbars should be customised (in IE),
Bleagh. ;-)
with only the vertical scrollbar visible.
That depends.
Instead, the text is a little over the full width of the frame,
How wide is the frame?
and both scrollbars are visible,
When a page that trggers Standards mode in IE6 is in a frame it either
shows no scrollbars or both scrollbars.
and are default shades.



Really? I thought that the coloured scrollbars weren''t affected by
Standards mode. Maybe because you''re in a frame....

What happens (widths, scrollbars, etc.) when you view the page outside
of its frameset?

A URI would really help.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


Thanks Steve,

I''ll try and knock up a demo, and then repost.

Chris


这篇关于插入完整doctype后出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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