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.
14 Replies
It is because you have one giant line/string for the p content. It does not have away to break it up?
Hmm even with that, how can i make sure the CSS just wraps it? I thought the overflow-wrap: breakword would do it?
This is what made me think there is an issue with the div, the parent here is going "under"
it cant break words if its one giant word
you would never have text without spaces either right?
like testtestesttesttest... is one word
Yeah true, i just copy pasted test a bunch of times lol didn't even think about that
idk why you would test with that
use lorem π (made for filler for a reason)
so you are saying the div is fine? because in my last screenshot it does look like the div itself is kind of weird?
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
Hmm okay got it
Overall with my flex, what would you rate the code? is it janky or okay ish? lol
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 π€·ββοΈ
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...
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!
welcome and np!