Submitted about 1 year ago
responsive barcode using appropriate div elements and css properties
@Ayodeledavid123
Design comparison
SolutionDesign
Community feedback
- @DigitaleWeltLibraryPosted about 1 year ago
Hey, good solution.
Some improvements:
- give the
body tag
a height of100dvh
(is the whole screen height) - give the
img tag
a width of100%
to cover the entire width - your last
p tag
is no longer on the card (.barcode-container
). Either you remove the height or you give it the valuemin-content
The improved CSS:
body{ height: 100dvh; } img{ width: 100%; } .barcode-container{ height: min-content; /* use this to have a border in the phone view */ width: min(300px, 90dvw - 40px); /* or */ box-sizing: border-box; }
Happy Coding 😉
Marked as helpful0 - give the
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord