Just an observation. I have been interviewing candidates for a web dev position. A serious lack of knowledge in HTML/CSS.

I don’t disagree that there are places for it’s use. You’re absolutely right and thank you for pointing that out.

Another example is within ::before and ::after pseudo elements.

The intent was that, in general, there are better options in most cases. Even then I’d still probably argue against position absolute based on the fact that it’s taking the element outside of the document flow and often times makes making any future changes more difficult.

The questions you should ask yourself.

  1. Can this be achieved by simply changing the display? If no, use float.

  2. Can it be achieving using a float? If no, change the position (absolute, fixed, static?)

/r/webdev Thread