5 ms·
Things have changed since I was doing frontend dev (<table>), and I want to brush up on modern CSS techniques. Could someone answer the following for me? 1. Is
by amarraja 11y ago
Things have changed since I was doing frontend dev (<table>), and I want to brush up on modern CSS techniques. Could someone answer the following for me?
1. Is flexbox the way to go (i.e. the new standard?)
2. Is there a css primer to help with all this? I tried centering a div with CSS once, it didn't end well!
- jacobolus 11y ago1) Yes. 2) This is a pretty nice short intro http://flexboxin5.com http://flexboxin5.com or for a fuller treatment check MDN, as for any other web technology. There are a bunch of other sources linked from this discussion thread if you scroll down a bit.
- amarraja 11y agoThanks! So it will be enough to learn just flexbox without any "legacy" css? (Assume I won't be maintaining / porting any old code)
- DiThi 11y agoI think everything related to layout can be made with flexbox (e.g. you can avoid doing ugly tricks with tables, blocks, floats, calc(), calculating percentages, etc), but you still need the usual style for text, size of images, borders, backgrounds... Essentially, it avoids the "I FSCKING HATE CSS" parts.
- jacobolus 11y agoErm.. flexbox is just one part of CSS, useful for a particular subset of layout tasks. CSS has many other parts you need to learn if you want to style web pages.
- amarraja 11y agoAah I see. You can tell my frontend knowledge is dire! I'll start on the basics first
- madawan 11y agoit looks like it'll become the next standard yes. but support isn't there yet. http://caniuse.com/#feat=flexbox http://caniuse.com/#feat=flexbox http://howtocenterincss.com/ http://howtocenterincss.com/
- graup 11y ago93.99% is more than "support isn't there yet", in my opinion. Enough for many projects at least. Obviously if you develop sites with a big IE8/9 audience you should think twice.