html - Dropotron 左填充不起作用

标签 html css

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

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>

最佳答案

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

关于html - Dropotron 左填充不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42981601/

相关文章:

html - 如何在列表中的这些 Logo 之间添加空格

不重复时不显示 CSS 背景

Jquery/CSS,如何拥有和访问多个(左)面板,同时自动调整主要内容容器

jquery - 视差 float 图像 <div>

html - Bootstrap 4,处理响应式 div

javascript - 删除 Iframe 中的类

javascript - Vue2 v-text 工作不正确

javascript - 在 rails 中使用 link_to 呈现部分 onclick 时返回错误 ActionController::UnknownFormat

css - 使用内联 :block and variable width 的响应式布局

javascript - Angular.js linq.js 过滤器无法正常工作的地方