Trying to remove that empty fill space and take the li's to right

Viewed 47

the empty space is mentioned and I want that purple space to get clear and want the list items to float to right

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%;
}
1 Answers

Replace your Html and Css with given below & render it-

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;
}

Related