Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
How to change the font size of posts
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Mar 26, 2012 - 3:45 am

Which variable in what file should I edit to increase the font size of the text in a forum post. Currently, the font size is too small in my forums to be userfriendly.

I don't want to use the Font Resize plugin because more plugins will slow down the site I think

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 26, 2012 - 4:24 am

It depends what SP theme you are using. If the 'default' for example, then you need to look at the colour 'overlay' file you are using with the theme. You can check this in the forum admin > Themes > Available Themes panel.

You can use the theme editor to open up the overlay file. If you want to change ALL font sizes proportionately - then in the first block of that file you will find the definition for the '$mainFontSize' which will be set to 100%. Enlarge accordingly.

If you want to cherry pick the elements of the forum you want to change then you need to scroll down to find the 'Misc Font Sizes' section where you can hone in in more detail.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/).

andy-signature.png
YELLOW
SWORDFISH
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Mar 26, 2012 - 4:43 am

I have a custom theme by the name mytheme. I looked for '$mainFontSize' in mytheme.css but was unable to find the variable. In which file will this variable be present ?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 26, 2012 - 5:06 am

Well as I said it depends on the theme. If you based it on one with overlays then you need to look at the overlay as I specified above.

if you cloned the CSS only theme then it gets a little more complex and you really need to  tell me if you want to make all fonts bigger or just the font in the posts - which is what you suggested originally.

andy-signature.png
YELLOW
SWORDFISH
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Mar 26, 2012 - 5:17 am

Yes, primarily I want to increase the text size to increase in forum posts. For example,if you check the following link in firefox, the size of the font is quite small and one has to really concetrate hard to be able to read in a flow.

http://www.aristotleprep.com/f.....h-edition/

It appears fine in chrome though.

I tried changing the value to 140% in the following code in mytheme.css(which is a clone of css-only theme as you rightly mentioned). Changing this variable "font-size" doesn't seem to have the desired effect though

#spMainContainer small {
    font-size: 140%;
    padding: 0;
}

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 26, 2012 - 5:34 am

'#spMainContainer small' will have no effect overall as that specifies any tags with the 'small' attribute. You need to change the main '#spMainContainer' rule itself which currently is set to 100%.

If you only want to change the font size of post content then look for:

#spMainContainer .spTopicPostSection .spPostSection .spPostContentSection .spPostContent

which is currently set to 90%.

andy-signature.png
YELLOW
SWORDFISH
Avatar
mann
Member
Free Members
sp_UserOfflineSmall Offline
Mar 26, 2012 - 7:36 am

Whoa! Worked like a charm. Thank you.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625