3 ms·
This resource .. showcases a number of techniques. That's kind of the point.. you should not need to have a page to showcase different techniques for something
by gizzlon 13y ago
This resource .. showcases a number of techniques.
That's kind of the point.. you should not need to have a page to showcase different techniques for something this basic.
I, for one, does not have to deal with this. But as and outsider it seems strange that simple things are so hard. Maybe web developers have gotten so used to dealing with things like this that they don't see how convoluted it is?
- wmeredith 13y agoAs a designer and client-side dev, I've been using CSS and HTML for about 9 years. A lot of the weird edge cases and nuances are second nature to me now. However, if you step back and look at it all, it's pretty goofy, but then again, so is English. But I'm going to keep using it, because there isn't anything else. At this point, I'm really good at it anyway and this stuff doesn't really bother me too much.
- proexploit 13y agoI see what you're saying and I agree it would be great to be simpler. My perspective is that the complexity is actually in the flexibility in CSS and the number of options provided to you. I'm not sure how I'd make it simpler without removing some of the control.
- riffraff 13y agohonest question, but what would the problem be with having "margin: auto" work vertically as it does horizontally? EDIT: I mean, what freedom would have been lost when it was designed to work like this, not talking of changing it now.
- jessedhillon 13y agoWhat would you do with this case then? .outer {height: 1200px; width: 800px;} .inner {margin: auto;} <div class="outer"> <p class="inner">This is centered vertically</p> <p>But where should this go?</p> </div> And what if both p elements had the `inner` class?
- coldtea 13y ago>My perspective is that the complexity is actually in the flexibility in CSS and the number of options provided to you Not really, most of the complexity is of the ill-thought design they started with, and the LACK of options for certain things. Initially the envisioned CSS as a styling technology, so layout was an afterthought. Even the messy floats hacks (those one that replaced tables) wasn't something that was though of specifically as a complete layout solution. We had to wait 10+ years, to have actual layout solutions catering to the needs of web designers: Flexbox, Regions, Multi-Column layout and Grid Layout -- and of course those are still not implemented totally by browser vendors, give a few years wait for that too.
- proexploit 13y agoThat's fair. Perhaps I'm too comfortable with the concepts I've been forced to learn thus far.