Dropotron左边填充不起作用

时间:2017-03-23 16:19:10

标签: html5 css3

我想在下拉菜单中减少正确的空间。

enter image description here

试过:

.dropotron li {
            box-shadow: inset 0 1px 0 0 #e6e6e6;
            padding-right: 0 !important;
        }

但没有成功。有什么想法吗?

我的CSS:

.dropotron {
        list-style: none;
        padding: 0;
        background: #fff;
        color: #444;
        min-width: 13em;
        padding: 0.75em;
        margin-top: -0.5em;
        font-family: "Raleway", Helvetica, sans-serif;
        font-weight: 500;
        text-transform: uppercase;
        box-shadow: 0 0 0.125em 0 rgba(0, 0, 0, 0.35);
    }

        .dropotron li {
            box-shadow: inset 0 1px 0 0 #e6e6e6;
            padding-right: 0 !important;
        }

            .dropotron li:first-child {
                box-shadow: none;
            }

        .dropotron a {
            color: inherit;
            text-decoration: none;
            letter-spacing: 0.05em;
            font-size: 0.8em;
            display: block;
            line-height: 3em;
            border: 0;
        }

        .dropotron.level-0 {
            margin-top: 0;
        }

            .dropotron.level-0:before {
                content: '';
                border-left: solid 0.5em transparent;
                border-right: solid 0.5em transparent;
                border-bottom: solid 0.5em #fff;
                display: block;
                position: absolute;
                top: -0.45em;
                left: 50%;
                margin-left: -0.25em;
            }

我的HTML:

<li>
 <a href="#" class="submenu fa-angle-down"><a href="#" class="image"><img src="images/flag1_a.png" alt="" /></a>
 <ul>
  <li><a href="#" class="image"><img src="images/flag2.png" alt="" /></a></li>
  <li><a href="#" class="image"><img src="images/flag3.png" alt="" /></a></li>
  <li><a href="#" class="image"><img src="images/flag4.png" alt="" /></a></li>
 </ul>
</li>

1 个答案:

答案 0 :(得分:1)

没有一个可以解决的例子我只是在这里猜测,但我认为可能是min-width: 13em;类的.droptotron控制宽度。尝试减少它,看看它是否有帮助。

相关问题