问题描述
我的目标是使用XHTML 1.0严格的DOCTYPE为我的工作,但我遇到一些奇怪的设计问题。
我具有以下代码:
< div>< img src =photos / someimage.jpgalt =Title />< / div>
当我加载DOCTYPE设置为1.0 Strict的页面时,图像,在div。我删除了代码中的所有空格/换行符,这似乎是这种问题的通常罪魁祸首。如果我将DOCTYPE更改为1.0 Transitional的间距已经去了,页面看起来应该。 >
任何人都知道在仍使用1.0 Strict时避免此问题的方法吗?
感谢您的时间!
My goal is to use the XHTML 1.0 Strict DOCTYPE for this page I'm working on, but I'm running into some weird design issues..
I have the below code:
<div><img src="photos/someimage.jpg" alt="Title" /></div>
When I load the page with DOCTYPE set to 1.0 Strict, a little gap of spacing is added below the image, within the div. I've removed all whitespace/line breaks in the code, which seems to be the usual culprit for this sort of issue.. If I change the DOCTYPE to 1.0 Transitional the spacing is gone and the page looks as it should.
Anyone know of a way to avoid this issue while still using 1.0 Strict?
Thanks for your time!
http://www.schoonzie.com/rogue-padding-below-images
https://developer.mozilla.org/en/images,_tables,_and_mysterious_gaps
这篇关于XHTML 1.0中的图像下方不需要的间距严格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!