2 ms·
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/HugoGir
by TheKidCoder 14y 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 http://codepen.io/HugoGiraudel/full/DoAIB
- arash_milani 14y agoCan 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?
- kumarharsh 14y agoyes, that is what I'm talking about... (although older browsers (IE) have some trouble with inline-block)
- drinchev 14y agoYep, but there is a hack for that too... https://github.com/chriseppstein/compass/blob/stable/frameworks/compass/stylesheets/compass/css3/_inline-block.scss 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-development/inline-block-whitespace-workaround/ http://www.lifeathighroad.com/web-development/css-web-develo...