是否可以将已经添加前缀的网页居中?
无论如何,是否有办法将已经具有固定值的网页整体居中?我个人不会这么认为,但我花了很多时间制作一个我满意的布局,现在为了使其居中,一切都必须重写。有什么办法可以防止并集中预先编写的代码吗?像桌子一样?抱歉,如果这是一个对代码来说相当陌生的未受过教育的问题。
任何指导或方向都会很棒
这就是我所追求的,目前全部固定在左侧:
Is there anyway to overall centre a webpage that already has fixed values? I personally wouldn't have thought so, but I've spent a lot of time making a layout I'm happy with and now to centre it, it's all going to have to be rewritten. Is there any way at all to in case and centre pre-written code? Like a table? Sorry, if this is an uneducated question pretty new to code.
Any guidance or direction would be great
This what I'm after, which is currently all fixed to the left:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试将其放入固定宽度且左右边距设置为自动的包装器中:
You could try putting it inside a wrapper with a fixed width and left and right margins set to auto:
JQuery Position UI 库具有将任何元素居中的方法(http://jqueryui.com/demos/position/)。您可以在文档加载后调用它们。例如:
JQuery Position UI library has methods to center any element (http://jqueryui.com/demos/position/). You can call them after the document loads. For example: