When setting widths and heights in CSS, are “vw” and “vh” compatible with every browser and with any device? Which bad practices should be avoided in regard?
My preference when it comes to setting sizes in CSS are em for elements that need to be flexible and px for those which do not. Images that I know I don't want to change sizes when they are on a smaller device, I use pixels as my units. If it is an element I want to shift as they site is shown on mobile devices, I use percentages or em units. Always remember to consider how your web project looks on small screens.