by flipstewart · 12y ago · 0 comments
"How they choose to center content inside the overlay is also revealing. Some of the candidates might choose to use CSS and absolute positioning, which is possible if the content is a fixed width and height. Otherwise may choose to use JavaScript for positioning."
First of all, JavaScript... just... no. Stop.
Secondly, hey, you don't need a fixed width or height, you just use:
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
I would really challenge the writer and anyone else interviewing for any position to consider that maybe they don't know everything.No comments yet.