JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
      <li id="parent">
          <a href="#">test</a>
          <ul class="child">
             <li id="child-elem">test-child</li>
          </ul>
     </li>
</ul>

CSS

#parent {
    width: auto;
    background-color: #ffa20f;
    position: relative;
}
.child {
    position: absolute;
    left: 0;
    right: 0;
}
#child-elem {
    background-color: #0f0;
}