Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Siirist on April 20, 2017, 11:06:37 AM

Title: How do I change the default font size from 10pt to 11pt
Post by: Siirist on April 20, 2017, 11:06:37 AM
Greetings,

I am wanting to change the default font size from 10pt to 11pt when posting throughout the forum, including when sending PMs.

I looked in the online manual and it insinuated that the css had to be changed, but if you make a mistake, SMF will not function properly.

That said, I am not going to go somewhere that MAY be the proper place and crash my forum.

Thanks in advance.

Kindly,
Siirist
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Bob Perry of Web Presence Consulting on April 20, 2017, 11:13:46 AM
Just guessing but I'd say you'd do that in the .css files somewhere, but don't ask me which one and where in the file... don't recall there being a setting in the basic admin settings so it must be in css...

Title: Re: How do I change the default font size from 10pt to 11pt
Post by: br360 on April 20, 2017, 12:23:39 PM
Look for this in your theme's index.css

/* Set a fontsize that will look the same in all browsers. */
body
{
background: #E9EEF2 url(../images/theme/backdrop.png) repeat-x;
font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;
margin: 0 auto;
padding: 15px 0;
}


You can try to change the 78% to 88%, or you can add this line right underneath the font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;
font-size: 11pt;
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Kindred on April 20, 2017, 12:56:41 PM
Setting the font-size toe a defined pt size is not recommended. using em or a percentage is the correct route these days, in order to support responsive designs
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Illori on April 20, 2017, 12:59:21 PM
Quote from: Siirist on April 20, 2017, 11:06:37 AM
I am wanting to change the default font size from 10pt to 11pt when posting throughout the forum, including when sending PMs.

i am not sure that this can be done just with CSS, i think it requires more changes to make it just apply to the posts/messages.
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Siirist on April 20, 2017, 04:03:51 PM
Thank you:
Bob,
BR360,
Kindred,
Illori,
for your replies.

If changing to throughout the forum would simplify the process, that is cool by me.

Thank you again.

With Gratitude,
Siirist
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Antechinus on April 20, 2017, 08:57:27 PM
Easiest way is to open index.css and then search for everywhere it says font-size. You can then change them one at a time and note the effects.

The code br360 quoted is the most basic setting, but there are other settings for specific elements, if you need them.

Oh and mistakes in the CSS won't crash your forum. The worst they can do is make it look a bit weird. They're easy to reverse too, so don't worry.
Title: Re: How do I change the default font size from 10pt to 11pt
Post by: Siirist on April 21, 2017, 09:02:18 AM
Thank you Antechinus

I will proceed with the counsel of everyone in mind.

Thank you again to all.

Will give it a go and report results here.

With Gratitude,
Siirist

EDIT: Used NotePad+ to open Forum>Themes>(your default theme name here) index.css, then IMMEDIATELY saved a copy as index-original.css (used if something goes wrong) then searched for "font-size".
There are 74 lines with font-size and only one or two are classified as pt every other one is (per Kindred) using em.
IMPORTANT: Following almost every reference to em, there is/are either margins, padding, or line-height.

I chose to believe that changing the font size, change presentation, i.e., if I change the font-size from 0.5 em to 1.5 em there will probably be a significant change in the appearance of the area that is changed.

I also believe that, as almost every font-size reference is followed by either margins, padding, or line-height, if you modify the font-size, it would be prudent to modify the attribute that follows it proportionately.

Example:
.normaltext{font-size:1em;line-height:1.2em;}
This is adding .5 to each attribute and is not proportionate .normaltext{font-size:1.5em;line-height:1.7em;}
This is a result of multiplying font-size of 1em times 150%, and then multiplying the line-height  times 150% and this is proportionate .normaltext{font-size:1.em;line-height:1.8em;}

Imagine doing this for 74 lines of coding.

Summary: Unless it is broken, don't fix it?
This shows the hard work and balance that the programmers are providing. Thank you for your work to make SMF what it is.
PS - I will leave the forum as is.  :P