![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Dec 2016
Device: iPad
|
ex to pt
Hello,
1-Is there a way to change the settings in css from ex to pt? 2-Please note that we also noticed that the conversion formula from ex to pt is wrong. for example: padding: 0.5ex 5.75pt while 1 ex should be equal to 4.30554 pt Corrected padding value: 2.152pt instead of 0.5 ex thank you |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,070
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
ex is the height of lower case "x" in the current font and so depends on the font selected and the current font size. pt is units of 1/72 inches. There is no fixed conversion ratio between the two units.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You do not want ex or pt. What you want is em.
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
add the word 'probably' to Jon's answer.
There are a few places where FIXED sizes are needed. They are few. Usually associated with another fixed object, like an image with text overlay. In general, fixed (absolute) sizes should be avoided. they don't scale |
![]() |
![]() |
![]() |
#5 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
The one thing I tend to do in fixed units are page margins, because I don't want my margins to scale with the text. I use ems for everything else.
|
![]() |
![]() |
Advert | |
|