I am trying to combine CSS grid with position in order to have my page effectively adjust to different screen sizes. My thinking is to have one grid design for mobile and one for desktop using @media(screen-width).
My thinking would be to have the grid blocks be driven by grids and have the content in the grid blocks be driven by position.
Now my understanding is that grid would create a imaginary rectangle based on the columns and rows and that when i use position that it would latch on to the one corner of the grid block.
Question
01 Where is my misunderstanding of this concept?
02 Are there better ways to do this?
My code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSS Grid</title>
<style>
.wrapper_main {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-auto-rows: minmax(100px, auto);
grid-gap: 1em;
justify-items: stretch;
align-items: stretch;
}
.box0 {
grid-column: 1/6;
grid-row: 1;
border: 1px solid #333;
}
.box1 {
grid-column: 1/6;
grid-row: 2/6;
border: 1px solid #333;
}
.seconds01 {
position: fixed;
right: 20px;
top: 50px;
}
.seconds05 {
position: fixed;
right: 100px;
top: 50px;
}
</style>
</head>
<body>
<div class="wrapper_main">
<div class="box box0">Box 0</div>
<div class="box box1">
<a class="seconds01"><img src="img/Candle_Box_Tag.png"></a>
<a class="seconds05"><img src="img/Candle_Box_Tag.png"></a>
</div>
</div>
</body>
</html>

