[Solved] HTML css – width of element than 100% width


Doing it html + css only, you need to wrap each line in a div, like

.gray-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: red;
}

.line {
  display: inline-block;
  position: relative;
}

.tooltip {
  display: inline-block;
  position: absolute;
  background: black;
  width: 30px;
  height: 20px;
  margin-left: 10px;
}
<div class="gray-container">
  <div class="line"><input type="radio">None<div class="tooltip"></div></div>
  <div class="line"><input type="radio">Two</div>
  <div class="line"><input type="radio">Three</div>
  <div class="line"><input type="radio">Four</div>
</div>

Now for demo purposes and because i don’t have any idea of the methods you’re using to create the tooltips since you didn’t post your code i’m using a div with class="tooltip", but this solves your question of the div being 100%.

2

solved HTML css – width of element than 100% width