(来源:ctrlv.in)
当我将浏览器的宽度减小到大约 700 像素以下时,我在我的响应式设计网站中遇到了这个问题。
我添加了 margin-left: auto;
margin-right: auto;
,但输出保持不变。如果我把 left:50%, 它可能显示一些奇怪的位置,因为我的标题是 postion:fixed
(虽然我没有在其他任何地方都提到了它的顶部/左侧/右侧/底部)。
Logo “ilovetrolls”从页面的中心开始……因此图像的中心不是居中的。 The page
(来源:ctrlv.in)
任何帮助将不胜感激。非常感谢
最佳答案
去掉这个样式
#header {
text-align: center;
}
在仅媒体屏幕宽度 767 中放置内联行 428
关于html - 如何居中 "center of div"而不是 div 的 "starting point",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15152819/