什么是一个实用的解决方案,可以在HTML,IE6和IE7中使用HTML中的纵向和横向内容?
一些细节:
“leftSpace width =(screenWidth-widthOfCenteredElement)/ 2”+ “centeredElement width = widthOfCenteredElement”+ “rightSpace width =(screenWidth-widthOfCenteredElement)/ 2”
高度相同:
“topSpace height =(screenHeight-heightOfCenteredElement)/ 2”+ “centeredElement height = heightOfCenteredElement”+ “bottomSpace height =(screenWidth-heightOfCenteredElement)/ 2”
发布于 2019-06-21 08:35:20
对于水平方向:
<style>
body
{
text-align:left;
}
.MainBlockElement
{
text-align:center;
margin: 0 auto;
}
</style>
你需要在body中使用text-align:left来修复IE渲染的错误。
https://stackoverflow.com/questions/-100001261
复制相似问题