I have this :
#toast {
position: fixed;
left: 0;
right: 0;
margin: auto;
bottom: 20px;
width: auto;/* not needed */
max-width: 90vw;
min-width: 250px;
font-size: 16px;
background: red;/* for refrence */
}
<div id="toast">Hi</div>
I want my element 250px wide, but instead it is 90vw. (250px can be 50px, still problems)
Why is it 90vw, and how do I make it 250px when it has no content? It should still be centered. transform: translateX(-50%)
doesn't work because then it won't be wider than 50vw.