3 ms·
> hey, just center this thing Step 1: On your container div... display:flex; justify-content:center; align-items:center; Step 2: There is no step 2.
by exodust 8y ago
> hey, just center this thing
Step 1: On your container div...
display:flex;
justify-content:center;
align-items:center;
Step 2: There is no step 2.
- bsamuels 8y agothis won't work on bootstrap elements
- seekingcharlie 8y agoAre you using the bootstrap’s utility classes? .d-flex.align-items-center etc
- exodust 8y agoAnother reason to avoid bootstrap if possible. I wouldn't touch that thing with a 10 foot div. Each to their own, but it's better to make your own templates, unless your primary role is something other than frontend dev and you want the equivalent of store-bought pasta sauce instead of making your own pasta sauce.
- lmm 8y agoYeah, with flexbox we can finally do the layouts we could do with tables since 1996, and it's only a little harder.
- goto11 8y agoWith display:table from CSS 2 you could do the layouts you could do with HTML tables. Flexbox solves a different problem - for example you can't have rows and column in a flex. There is some overlap in functionality, but generally flex is more convenient to use.