Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1318

how can i change the gap of only one element in a flexbox?

$
0
0

i am creating something with css flexbox and use gap to give spacing between elements but now i want to change the spacing of only one element like

.container{  display: flex;  gap: 20px;}.items{  width: 100px;   height: 100px;  background: red;}.item-4{  background: blue;}
<div class="container"><div class="items item-1"></div><div class="items item-2"></div><div class="items item-3"></div><div class="items item-4"></div><div class="items item-5"></div><div class="items item-6"></div></div>

Now I want to change the gap of blue box to 5px from 20pxis there any way to do this


Viewing all articles
Browse latest Browse all 1318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>