HTML5-placeholder-polyfill icon indicating copy to clipboard operation
HTML5-placeholder-polyfill copied to clipboard

Placeholder positioning sensitive to CSS layout

Open thesheep opened this issue 12 years ago • 2 comments

The way the generated placeholders are positioned can be corrupted if you have hidden elements in the DOM above the location of the INPUT. For example, I had a long form with some sections of the form displayed using expand/collapse behaviour. All generated placeholders below these sections were positioned incorrectly, outside their INPUT elements.

The best way I have found to fix these issues is to apply position: relative to some container elements within the form.

thesheep avatar Oct 24 '12 10:10 thesheep

Do you have a testcase for this issue anywhere?

ginader avatar Nov 29 '12 17:11 ginader

This may or may not be related, I also have some positioning issues with the polyfill in IE when font-size does not fit perfectly to line-height the vertical position does not appear to take into account the difference. eg. line-height:18px; font-size:16px;

The position of the placeholder overshoots the center by 2px

raldred avatar Dec 05 '12 14:12 raldred