#cannot space divs
1 messages · Page 1 of 1 (latest)
border-collapse: collapse;
margin: 25px 0;
font-size: 0.9em;
font-family: sans-serif;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
display: flex;
}```
why cant I get my news to be in the middle of the space between the end of the table and the end of the page? it is just sticking next ot the table
Float right doesnt work
im an idiot
ignore!
closing post my html had a type in a name
Play around with the display property. It probably needs to be set to block.
You can also try a clearfix solution. I think that's a clear property. Give it a search.
The float is causing the divs to appear in a row. You need to break that. The above techniques should do it.
what a bout if i had a container with elements going in a row, but i want my first element on the left and the second element in the cente rof the page?
margin auto wont work for that
Why not?
So I don't think you should be mixing floats with flex.
Ah ok
whats the recommended way?
flex + margin?
also how do you deal with going from a 24inch 1080p screen to also looking the same on a 4k 14inch laptop?
One or the other.
Though admittedly my CSS game is weak. I use frameworks for these layout problems.
Floats and auto margin can manage this. Or flex alone
im using auto margin but they wont seperate with one being in center of the parent container
Responsiveness is a hard problem. Look at Foundation, Bootstrap, or Tailwind.
You're using it with flex. Like I said, one or the other.
But I could be wrong.