Font size overridden by WYSIWYG 20 (shows 24px but renders 32px)

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Mariasol
 
 
Posts: 39
Joined: Tue Feb 08, 2022 9:19 am

Font size overridden by WYSIWYG 20 (shows 24px but renders 32px)

Post by Mariasol »

Hi,

I’m using WYSIWYG Web Builder and I’m having an issue with font sizes inside card elements.

In the editor, I set the font size of my text (for example 24px), but when I preview the page in the browser, the font size is different (it becomes 32px).

After inspecting the element in the browser, I noticed that WYSIWYG automatically generates CSS like this:

#coffeeCard2-card-item1 {
font-size: 32px;
}

This overrides the font size I set in the editor.

My questions are:

* Why does WYSIWYG apply its own font-size to these generated IDs?
* How can I prevent this behavior?
* Is there a recommended way to control font sizes consistently without manually overriding CSS for each element?

I’m trying to build a clean and consistent design, but these automatic styles make it difficult.

Any help or best practices would be greatly appreciated.

Thanks!
User avatar
BaconFries
 
 
Posts: 6292
Joined: Thu Aug 16, 2007 7:32 pm

Re: Font size overridden by WYSIWYG 20 (shows 24px but renders 32px)

Post by BaconFries »

In the editor, I set the font size of my text (for example 24px), but when I preview the page in the browser, the font size is different (it becomes 32px).
Ok maybe this will explain When you select a font size in WWB it is in pt (points) and the output will show as px (pixels) as it is in the html. In this instance when you have selected 24 it is in pt (points)not pixels. A quick sum of how this works in Web Design is this 1 point (pt) is approximately equal to 1.333 pixels (px). This means that 1 pixel is roughly 0.75 points. So 40pt x 1.333px = 53.32px and 32pt x 1.333 = 42.656 or rounded to 43px

See the following table that shows pt to px. -->24pt to 32px So if you want it to be 24px then you should select 18pt
Image
Mariasol
 
 
Posts: 39
Joined: Tue Feb 08, 2022 9:19 am

Re: Font size overridden by WYSIWYG 20 (shows 24px but renders 32px)

Post by Mariasol »

very big thank you, bacon fries :D
Post Reply