【问题标题】:float: right makes all elements in reversefloat: right 使所有元素反转
【发布时间】:2015-01-10 05:31:15
【问题描述】:

最近从一位新客户手中接管了一个网站。试图在标题中创建两个 div。左边是标志。很好,那里没有问题。但是右边的 div 有两个元素,它们都应该在那个 div 的右边。尝试向右浮动并更改边距、填充等。没有太多工作。大问题是顺序应该是社交图标,然后是 MailChimp 小部件,相反,它是相反的。这是我目前用于该区域的 CSS 的内容:

    #theme-logo {
     width: 50%;
     float: left;
     margin: 0;
 }
 #theme-header {
     min-height: 60px;
 }
 #theme-header .tabcontent ul li.widget {
     position: relative;
     float: right!important;
     padding: 0px 20px;
 }
 #theme-header .tabcontent {
     position: relative;
     float: left;
     top:0px;
     width: 50%;
 }
 #theme-header .tabcontent ul {
     float: left;
     list-style: outside none none;
     margin: 0px 0px 0px 0px;
     padding: 0px;
 }

【问题讨论】:

  • 你说的是列表项吗?
  • 可以加html吗?

标签: html css widget html-lists


【解决方案1】:

找到了。原始主题在 MailChimp 小部件的 div 上具有绝对定位。像这样:

#mc_signup { position: absolute; right: 0px; width: 226px; }

所以我刚刚从主题的 CSS 中删除了该行,问题似乎已经解决了。

从别人那里接手主题从来都不是一件有趣的事。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-12
    • 2011-06-13
    • 2021-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-26
    相关资源
    最近更新 更多