3 ms·
On a related note, the other day a colleague linked me to his simple guide[1] on doing responsive design in CSS. Rather than being an in-depth guide like this o
by sdegutis 13y ago
On a related note, the other day a colleague linked me to his simple guide[1] on doing responsive design in CSS. Rather than being an in-depth guide like this one, it complements it by providing a high-level overview of some simple tricks you can (should probably?[2]) use for accomplishing basic/common layout tasks.
[1]: http://www.adamkaplan.me/grid/ http://www.adamkaplan.me/grid/
[2]: All except the "float: left" stuff; I'm still on the fence between that and "display: inline-block; vertical-aling: top"
- wil421 13y agoI tend to stay away from floats when I can use display:inline-block. Floats tend to cause me more heartache than they solve. Especially if its a list I always use inline-block but they each have their drawbacks.
- dsego 13y agoInline blocks have other issues, like spaces between the elements messing up the layout.
- sdegutis 13y agoAre there other issues than the spaces-issue? This one is a non-issue for me, since I use Hiccup[1] for Clojure, which collapses all whitespace for me. [1]: https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup
- unfunco 13y agoIf you're intending to target < IE7 then inline-block only works on elements where the default display type is inline. It's less of an issue now of course, but despite float having certain issues (example: having to use a clear:both with frequency) it's the preferred route. Then again, you might just want to look at a grid system which will handle all the quirks for you.