As the title suggests, I am having issues with the styling of a parent div in a way that it uses x% of screen width. I want the section to use 100% of the screen width, the child use 80% of the parent. Finally the two children within that child to split equally. As of right now, everything is doing what i want it to, apart from the section element not using 100% of the viewport width. I have tried using -webkit-fill-available (i think it was called like that) among others to no result.
The component is rendered dynamically in a different component.
Here is the html and css for the one having issues
<section class="topList-section">
<main class="topList-main">
<div class="artists-list">
<h2 class="toph2">Top Artists</h2>
<ol>
@for (artist of artists; track $index) {
<li>{{ artist }}</li>
}
</ol>
</div>
<div class="tracks-list">
<h2 class="toph2">Top Tracks</h2>
<ol>
@for (track of tracks; track $index) {
<li>{{ track }}</li>
}
</ol>
</div>
</main>
</section>
and css
.topList-section {
width: 100vh; /* I think this is the stubborn one */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.topList-main {
display: flex;
background-color: var(--white);
min-width: 80vh;
height: fit-content;
justify-content: space-between;
}
.artists-list,
.tracks-list {
flex-basis: 45%;
display: flex;
flex-direction: column;
background-color: var(--secondary-color);
border-radius: 25;
}
.artists-list {
margin-right: 20px;
}
.toph2 {
color: var(--accent-color);
font-weight: bold;
font-size: 4rem;
}
i can also provide with the parent component but it doesnt have any specific styling for this component and doesnt have any parents around the portal.
Thanks.