css - How to make icon same/similar physical size on range of different devices? -


i've got problem has me stumped. seems must common issue nowadays, i'm surprised couldn't find question it.

basically, have icons appear on site. want them appear same size - touchable size - on every device. old cheap 2.3 samsung new high 2560x1440 high res display, want these icons 1.5" across. similar size on tablets, on computers, etc.

what reasonable approach figuring out, without instance making complex table of whole range of devices , screen sizes?

you should use absolute measure values (cm, pt, mm, in, pc) instead of relative ones (px, em, %) :

.my-image {     width: 1.5in;     height: 1.5in; } 

Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -