w3c/wai-tutorials

[forms tutorial] typo makes information incorrect?

shawna-slh opened this issue · 1 comments

From e-mail:

Hi, I just noticed a typo in the page at:
https://www.w3.org/WAI/tutorials/forms/labels/#note-on-hiding-elements

It's small but the CSS rule shown appears to invert a value, having an effect that is opposite of the description that precedes it. I suspect the error is in the description, not the CSS.

The text above the code says it's for "presenting the label in a 1-by-1 pixel area with a 1-pixel margin".

But the code includes "margin: -1px;"

So I'm guessing the explanation should say, "with a -1-pixel margin" or "margin of -1 pixel" or something like that.

yatil commented

The height is 1px and the width is 1px, the margin -1 makes sure that the element does not take up any space as it is moved 1px to the top and the left, out of the way.