DIV going under other div

Hey guys, 2 questions: 1) why is my left div content the <p> running under the the right hand gray area i have set up, even though the parent div width is right 2) what would you rate the overall approach to how i am setting up the modal here? Any tips to improve overall structure? https://codepen.io/assyrianlegend/pen/qBJxXrO Thanks.
Belbron
CodePen
qBJxXrO
...
14 Replies
b1mind
b1mindβ€’2y ago
It is because you have one giant line/string for the p content. It does not have away to break it up?
b1mind
b1mindβ€’2y ago
Assyrianlegend
AssyrianlegendOPβ€’2y ago
Hmm even with that, how can i make sure the CSS just wraps it? I thought the overflow-wrap: breakword would do it?
Assyrianlegend
AssyrianlegendOPβ€’2y ago
This is what made me think there is an issue with the div, the parent here is going "under"
b1mind
b1mindβ€’2y ago
it cant break words if its one giant word you would never have text without spaces either right? like testtestesttesttest... is one word
Assyrianlegend
AssyrianlegendOPβ€’2y ago
Yeah true, i just copy pasted test a bunch of times lol didn't even think about that
b1mind
b1mindβ€’2y ago
idk why you would test with that use lorem πŸ˜„ (made for filler for a reason)
Assyrianlegend
AssyrianlegendOPβ€’2y ago
so you are saying the div is fine? because in my last screenshot it does look like the div itself is kind of weird?
b1mind
b1mindβ€’2y ago
last screenshot still using one giant word Personally this is where I would use Grid over flex but cause then you have full control on the parent
Assyrianlegend
AssyrianlegendOPβ€’2y ago
Hmm okay got it Overall with my flex, what would you rate the code? is it janky or okay ish? lol
b1mind
b1mindβ€’2y ago
I don't rate others code sry, specially CSS cause there is way to many ways to do something xD looks fine at glance though πŸ‘ maybe use flex basis over widths πŸ€·β€β™‚οΈ
b1mind
b1mindβ€’2y ago
Kevin Powell
YouTube
The thing people get wrong about flex-basis
πŸŽ“ Dive even deeper with my 4-hour long flexbox course: https://flexboxsimplified.com Flex-basis is one of those things that people sort of, kind of, maybe understand what it does, and I often see some bad advice, like β€œflex-basis” is just width for flexbox, when that can actually lead to some unintended consequences, so in this video I break do...
Assyrianlegend
AssyrianlegendOPβ€’2y ago
okay thanks, i did have it initially with flex basis, new to does, and thought maybe does were casuing the issue with the text so switched over to width ill watch that, thanks for your help!
b1mind
b1mindβ€’2y ago
welcome and np!
Want results from more Discord servers?
Add your server