My website http://sbmcrushers.net can't pass XHTML strict validation. What should I do?
Maybe I can use:
<object data="include/index.html" type="text/html"
style="border:none; width:960px; height:244px; 开发者_运维技巧margin-top:-10px;"></object>"
But it scrolls when I use that.
You can't have iframes in XHTML documents. You can have div
tags though, and apply overflow:scroll
via CSS. This will cause a scrollbar to appear if the content inside them is too big for the dimensions you assign the div.
Just throw whatever content you've got in include/index.html
(minus the html/body markup) into the page itself, inside a div:
<div style="width:960px; height:244px; overflow:scroll"><!-- content of index.html --></div>
You could validate the page as XHTML 1.0 Transitional, or XHTML5, instead.
Strict != good.
I solved it:
<object data="include/index.html" type="text/html"style="border:none; width:200px; height:90px; margin-top:0px; overflow:hidden; "></object>
There is no scroller.
Some overflow types:
visible
The overflow is not clipped. It renders outside the element's box. This is default
hidden
The overflow is clipped, and the rest of the content will be invisible
scroll
The overflow is clipped, but a scroll-bar is added to see the rest of the content
auto
If overflow is clipped, a scroll-bar should be added to see the rest of the content
inherit
Specifies that the value of the overflow property should be inherited from the parent element
精彩评论