Today I visited a job interview and was asked the following question:
How can you center an image of unknown height and width both vertically and horizontally without the usage of tables (e.g.
display:table-cell
)?
I was given a hint that this is possible to do using before
and after
pseudo elements but I failed to find a solution. Could you please guys help?