Thatâs literally what zoom does, youâre describing zoom.
Edit: however youâre specifying font size in print units (1pt == 1/72 of an inch), so although modern browsers should zoom regardless, they might not in that case. The solution in that case is donât use units designed for printed documents.
zoom is a non standard CSS property thatâŚzooms, it just applies zoom. It was for old Internet Explorer, is non-standard, and shouldnât be used (and doesnât really make any sense here)
vw is a percentage of the viewport width, so 1vw is 1% of the width of the viewport. Not sure how it interacts with zoom: as itâs based on the size of the viewport, I donât see how zoom will affect it at all.
1rem would be the base text size (by default, 16px). So
h1 {
font-size: 1.6rem;
}
Go up from the base size, not down from the largest size, itâs much easier.
CSS is fine, theyâre just different ways of measuring size. There have to be multiple ways because there are different ways of sizing things.
rem is specific to CSS, as are the viewport units mentioned above (vw, and vh which is the height of the viewport). All the rest are just standard units
em is the width of the âmâ character. In CSS it is simplified to the font size of the current element.
Because that changes depending on how different parts of the text are sized, rem was introduced which is the base size, and is generally simpler to use. Rather than being the font size of the current element, it is the font size of the root element. So if you donât set any size, 1rem will be 16px. If you set a font-size of 100px on the html element, then 1rem will be 100px.
% is percent and doesnât work well for fonts.
px is the size in pixels, but that can change depending on device resolution.
cm, mm, in are self-explanatory.
pt is a point,1/72 of an inch, pc is a pics, 12 points, they are standard typographic units for print media. Not used in CSS very much at all.
And it supports ch (width of a â0â character) and ex (height of an âxâ character) but they are not really used. Again, these are typographic units.
Title is 100.
Other text is 60.
60 is the base size.
100 á 60 = 1.66666âŚ
60 à (100 á 60) = 100
1 Ă (100 á 60) = 1.666666âŚ
Well itâs just easier, itâs nothing to do with code. Start from a common size, then size relative to that, rather than starting with an uncommon size and trying to figure out the maths from there.
so this thing is doing what is asked? â1.666666âŚâ ?
h1 {
font-size: 1.6rem;
}
whatâs this âremâ thing doing exactly?
thatâs the lsit, thatâs not very long at all
and most of them arent used
i guess it didnt matter
nothing to do with code. Start from a common size, then size relative to that, rather than starting with an uncommon size and trying to figure out the maths from there.
its everything to do with code, or laugnage or w/e is talked about, cos its the tool being used
if someone that itâs âmathâ then its still the same its stil the code, the code is restricted by math
so maht is part of the code
so we get to the point thatâs its still about the code the tool used
its always like that for eveyr single thing in this universe
until i see an exception
but we still end on the only point that matters:
but none of this has anything to do with zoom and that was the main question
This is three months later, and Iâm sorry I didnât immediately reply, but what have you looked at in these three months? There are vast resources on CSS typography a simple Google away, thousands and thousands and thousands of pages of explanation, from beginner resources to advanced typographic guides. If youâre coming back 3 months after your original post and posting this, Iâm assuming youâve made absolutely zero effort trying to find out anything by yourself: Iâm sorry I missed your post and didnât reply, but come on. I get English is not your first language, but there is no way, given how big a subject this is, that there are not resources on this subject easily available to you.
So
The root of an HTML page is the <html> element (the top-level element).
The default size of this is 16px (although you can make it any size you want).
1rem means 100% of the root font size, ie the font size on the root element, ie by default 16px.
If you want something 60% larger than that â ie 160% â you get 1.6. 160% of 1 is 1.6.
This is total rubbish. You either havenât looked or youâre asking completely the wrong questions
Well there are a load of links to things on rem units just there.
I answered you questions one by one:
you asked how to get zoom-dependent font sizing. Thatâs what zoom does, it zooms the size, so thatâs not really a question that makes sense.
you asked how to get the text size 60% of the title, how to get relative font sizong. I told you to use relative units.
So you donât know how to look for terms youâre unfamiliar with after you were told what they were? I can literally scroll up several posts and there we go, there are the terms that you donât know written down. So that means youâve completely ignored anything Iâve written; you could have Googled anything in my post, rem being an obvious example, but you have not done that: instead youâve said there are no resources anywhere on the internet. I can find thousands of web pages with useful info by just typing âcss remâ into Google or âwhat are rems CSSâ or whatever