how to make this div responsive ?
this is just a tag how can i make it responsive ? is it even possible i mean there should be padding / margin according to text length. how can i do that ?
first image is the one i made and second is the design
8 Replies
You can achieve this with flex
i'm using flex
let me send codepen
The
flex-grow:1
and width:100%;
on both;
also you don’t need to declare flex-direction:row
as that’s the default when adding display:flex
as well as not necessary to declare flex-shrink:1
which is also the default;I will try that in the morning
add
flex-wrap: wrap;
to the container and take off width: 100%;
on the children. They will then wrap when the screen can't fit both of them next to eachother.damn this worked !! thank you so much.
No worries