【问题标题】:Center the div and div overflow居中 div 和 div 溢出
【发布时间】:2014-01-02 01:19:39
【问题描述】:

我刚刚重新开始将网页设计作为一种爱好,但遇到了一些问题.. 我正在尝试将包含更多 div 的 div 居中,我也希望将其居中,并且我正在尝试使其在页面重新调整大小时进行; a, div 仍然居中 b, div 溢出也居中。

I realise this may not make to much sense so here is a link to the page

(如果你重新调整它的大小,你会注意到单选框四处移动并且没有居中)

And here is a link to the page on jsfiddle (although the js isn't important)

...

【问题讨论】:

  • 请在此处发布您的代码的相关部分。问题一解决,问题就没有参考点了……
  • 这就是问题所在,我不完全确定什么是相关的,因为我不知道你会如何开始。我已经用谷歌搜索了它,并且只找到了在没有重新调整窗口大小时将 div 居中的答案。

标签: html css centering


【解决方案1】:

这是因为您在.Cbox 上有display: inline-blockfloat: left。删除float: left

【讨论】:

    猜你喜欢
    • 2012-12-30
    • 2018-08-13
    • 1970-01-01
    • 2011-04-26
    • 2014-05-30
    • 2019-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多