In my CSS, I've set this code:
div#show{
background-color:black;
position: fixed;
width:100px;
height:100px;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
This code centers a black box on the page. However, I want to make it so that the box can adjust its size dynamically.
div#show{
background-color:black;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
The issue with this change is that it now covers the entire page. Is there a solution to allow the box to expand based on inner elements?