You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to setup a blog card from scratch using flexbox in Tailwindcss (tailwindplay sourcecode is here), but there are so many portions of the blog card messed up which I can't figure out. My requirements:
blog cards: flex-col in sm screen, and flex-row in md screen and above.
within blog card: image sits on top of text in sm screen, but sits on the left of text for md screen and above.
Each blog card has the same Height and same width in any screen size, but can vary when screen size changes.
Hence I was wondering were there any best-practice design which we can follow to save a huge amount of efforts, time, and pain for beginners like me?
In my specific example:
2. should I fix (in px or in fraction) the width and height of blog card of should I make them auto-fit its contents?
3. Why the image or texts overflow to outside of the div box in very small screen size?
4. How to make image auto-fix to its parent HTML element? In other words; 1/2 height + full width of blog card in sm screen, and full height + 1/3 width of blog card in md screen size and above
I tried all w-xx & h-xx options according to width and height chapter of tailwindcss official guide, but did not find a perfect solution.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to setup a blog card from scratch using flexbox in Tailwindcss (tailwindplay sourcecode is here), but there are so many portions of the blog card messed up which I can't figure out.
My requirements:
flex-colinsmscreen, andflex-rowinmdscreen and above.smscreen, but sits on the left of text formdscreen and above.In my specific example:
2. should I fix (in px or in fraction) the width and height of blog card of should I make them auto-fit its contents?
3. Why the image or texts overflow to outside of the
divbox in very small screen size?4. How to make image auto-fix to its parent HTML element? In other words; 1/2 height + full width of blog card in
smscreen, and full height + 1/3 width of blog card inmdscreen size and aboveI tried all
w-xx&h-xxoptions according to width and height chapter of tailwindcss official guide, but did not find a perfect solution.Beta Was this translation helpful? Give feedback.
All reactions