DEV Community

Discussion on: 4 CSS tricks that will get you dirty looks from other developers

Collapse
 
alohci profile image
Nicholas Stimpson

Not sure about the min-margins one. It could result in an unnecessary horizontal scroll bar if the viewport is narrow. But the others are good.

Collapse
 
cydstumpel profile image
Cyd

You could add an overflow hidden, or make sure the min margins don't outgrow the padding around the items on mobile, but you make a solid point that it's not that automatic

Collapse
 
alohci profile image
Nicholas Stimpson • Edited

The problem with using overflow:hidden is that if you've got something else on the page that genuinely needs horizontal scrolling, like a wide table, then that will get truncated.

For what it's worth, here's how I'd solve the problem, using wide spaces characters to make the gap between the anchors.