Hacker News new | ask | show | jobs
by TheKidCoder 4891 days ago
Remove that float:left and replace with display: inline-block. Then you can get rid of those pseduo-selectors with the margin rules.

http://codepen.io/HugoGiraudel/full/DoAIB

2 comments

Can you please show what you mean in a demo. the link you posted is using the same "float:left and pseduo-selectors with the margin rules" or am I missing anything?
yes, that is what I'm talking about... (although older browsers (IE) have some trouble with inline-block)
Yep, but there is a hack for that too... https://github.com/chriseppstein/compass/blob/stable/framewo...

Also, don't forget the whitespace of inline-blocks

http://www.lifeathighroad.com/web-development/css-web-develo...