i have a web page setup which uses css grid to display the main section centered at 80% width.
<html>
....
<body>
<main>
<section>
</section>
</main>
</body>
....
</html>
main {
display: grid;
justify-items: center;
}
section {
max-width: 80%;
min-height: 100%
}
now I would like to also be able to add a second section using a PHP if statement so that both sections are displayed right next to each other at 50% each. (while not altering the css via PHP) If I just add another section it will be displayed on top or below the first one.
I've already tried using grid-auto-columns as well as setting grid-template-rows to 100% but both didn't work as expected.
Any Ideas on how to solve this?
grid-template-columns:repeat(auto-fit,1fr)