When the browser has a standard resolution, the layout looks like this:
https://i.sstatic.net/tNR6X.png
However, on smaller screens, it appears like this:
https://i.sstatic.net/U3RnZ.png
Is there a way to adjust the positioning of these blocks using @media
in CSS for users with lower screen resolutions? I'm aiming for something like this:
https://i.sstatic.net/SpJ8y.png
This is my template code:
<div class="flex-c">
<div class="jackpot__information" v-if="luckyOfDay">
<div class="widget widget_jackpot widget_luck">
<div class="widget__head">
<div class="widget__title"><i class="icon icon_horseshoe"></i><span> Удача дня </span>
</div>
</div>
<div class="widget__main">
<a class="widget__photo photo" :href="'/user/' + luckyOfDay.winner.uid">
<img class="widget__image image"
:src="luckyOfDay.winner.avatar"
:alt="luckyOfDay.winner.username">
</a>
<div class="widget__information">
<div class="symbol_usd widget__bank">{{ luckyOfDay.total_bank }}</div>
<a class="widget__nickname link" :href="'/user/' + luckyOfDay.winner.uid"> {{ luckyOfDay.winner.username }} </a>
</div>
</div>
<a class="widget__chance link" :href="'/jackpot/history/' + luckyOfDay.game_id"> Шанс {{ luckyOfDay.winner_chance }}% </a>
</div>
</div>
<div class="jackpot__last">
<div class="widget widget_jackpot widget_last_game ng-star-inserted" v-if="lastGame">
<div class="widget__head">
<div class="widget__title"><i class="icon icon_clock"></i><span> Пред. игра </span>
</div>
</div>
<div class="widget__main">
<a class="widget__photo photo" :href="'/user/' + lastGame.winner.uid">
<img class="widget__image image"
:src="lastGame.winner.avatar"
:alt="lastGame.winner.username">
</a>
<div class="widget__information">
<div class="symbol_usd widget__bank">{{ lastGame.total_bank }}</div>
<a class="widget__nickname link" :href="'/user/' + lastGame.winner.uid"> {{ lastGame.winner.username }} </a>
</div>
</div>
<a class="widget__chance link" :href="'/jackpot/history/' + lastGame.game_id"> Шанс {{ lastGame.winner_chance }}% </a>
</div>
</div>
</div>
This is my CSS code:
.widget_luck {
position: relative;
width: 164px;
height: 150px;
padding: 18px 20px;
background-color: #213137;
border-radius: 10px
}
(... CSS styles continue)
@media (min-width:1600px) {
.widget_luck .widget__title {
font-size: 15px;
line-height: 16px
}
.widget_luck .widget__chance {
font-size: 13px;
line-height: 35px
}
}
(widget_last_game CSS styles and media queries are similar...)
I have attempted various methods of utilizing different @media css declarations where the dimensions are predefined, but none have been successful for me. If you can provide guidance, I would greatly appreciate it!