Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari ignores width:0 on anchor element

Tags:

html

css

safari

Look at this fiddle in any browser other than Safari. You should see 3 red blocks next to each other with a margin of 5 pixels to the right of each block.

If you look at the same fiddle in Safari and you see much more spacing between the blocks. It seems the width of the text nodes are included (try removing overflow: hidden).

Strangely I couldn't find anything about this anywhere.

Does anyone know how to fix this so the blocks look the same in Safari as any other browser?

like image 875
Flauwekeul Avatar asked Dec 14 '25 17:12

Flauwekeul


1 Answers

Try font-size: 0px to get it looking the same in Safari.

like image 177
Adam Avatar answered Dec 17 '25 09:12

Adam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!