I tried both ways by setting height:auto and right: 0, both did not work. Any idea? This is what my class looks like:

border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
right: 0;

It seems that I could only make it work by changing to position: relative.


So this is what our class looks like at the end:

border: 0;
height: 0;
width: 0;
margin: 0;
padding: 0;
font-size: 0;
overflow: hidden;
white-space: nowrap;
position: relative;
float: left;

I just tested for latest chrome, safari, firefox, IE edge. Not sure how backwards compatible it is.

A frontend web developer in Toronto

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store