/    Sign up×
Community /Pin to ProfileBookmark

Responsiness of pixel-units in different resolution screens

I am concerned with the relativity of the sizes of elements on my website.

**Example**
I have 2 laptops.
Laptop1: FullHD 15inch. Laptop2: 4K 15inch.
Will the same website where the element’s size is measured in pixels be twice as small on laptop2? This seems like a huge problem because the text may be just too small to read.

What units should I use to make the website look identical on both screens from the example?

The designer makes Figma design using pixels. How do I then convert it into something more relative? And what unit is the best to use on the website to make it relative and responsive?
Why is font-size always written in pixels if it’s not responsive at all?

Thank you very much!

to post a comment
CSSHTML

1 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumJul 07.2021 — Read this article about devicePixelRatio, it will answer your questions:

https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio

And ask again if there are any questions left.
×

Success!

Help @weareandrei spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...