【问题标题】:Trying to remove that empty fill space and take the li's to right试图删除那个空的填充空间并将li向右移动
【发布时间】:2022-01-09 00:46:09
【问题描述】:

提到了空白空间,我希望紫色空间变得清晰,并希望列表项向右浮动

html

<div class="top-head">
  <h1>Px to Vw and Vh converter</h1>
    <div class="Media-Queries">
      <ul>
       <li>Docx</li>
       <li><abbr title="Try Our Media Media-Queries no need of making on your own">Media-Queries</abbr></li>
      </ul>
    </div>
 .Media-Queries {
  width: 50%;
  padding-top: 0px;
}
.Media-Queries > ul {
  display: flex;
  flex-wrap: nowrap;
  column-gap: 25px;
  float: right;
  padding-right: 30px;
  box-sizing: border-box;
  width: 100%;
}

【问题讨论】:

    标签: html css flexbox padding


    【解决方案1】:

    用下面给出的替换您的 Html 和 Css 并渲染它-

    HTML

    <div class="top-head">
          <h1>Px to Vw and Vh converter</h1>
          <div class="Media-Queries">
            <ul>
              <li>Docx</li>
              <li>
                <abbr
                  title="Try Our Media Media-Queries no need of making on your own"
                  >Media-Queries</abbr
                >
              </li>
            </ul>
          </div>
        </div>

    CSS

    *{
      margin: 0;
      padding: 0;
      list-style-type: none;
    }
    .top-head{
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem;
    }
    .Media-Queries >ul {
      display: flex;
    }
    .Media-Queries > ul >li{
      margin: 0 0.5rem;
    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-22
      相关资源
      最近更新 更多