mardi 29 octobre 2019

How to give a div max auto width?

Hello i would like to give my div ("menu-content") an auto full width. My first div is auto-width by the text lenght and i want "menu-spacer" to take the maximum size it could get.

Here is the html

    <div class="wrapper container w-50">
  <div class="wrapper menu block">
    <div class="menu-content">Un menu tout à fait normal</div>
    <div class="menu-spacer"></div>
  </div>
  <div class="price block">50€</div>
</div>
<div class="wrapper container w-50">
  <div class="wrapper menu block">
    <div class="menu-content">Un menu</div>
    <div class="menu-spacer"></div>
  </div>
  <div class="price block">50€</div>
</div>

.wrapper {
  display: flex;
}

.menu-content {
  width: ;
}

.menu-spacer {
  width: 100vw;
  border-bottom: green 2px dotted;
}

.menu {
  width: 80%;
  text-align: left;
  color: black;
  padding-bottom: 0px;
}

.price {
  width: min-content;
  text-align: right;
  color: black;
}



Aucun commentaire:

Enregistrer un commentaire