Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Changing overall font size
Page:  1  2  next 
Avatar
Anton Emery #1
Member since Aug 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Changing overall font size
Hi folks,

I am new here, and to Dokuwiki in general.  We have a wiki at http://www.rhythmstrummer.com/wiki  I am not super knowledgable with CSS, and i am trying to increase the overall font size for our wiki.  The text for the various definitions is just to small to easily read. 

Can anyone point me in the right direction?  I have access to the wiki config files via FTP.


thanks


Anton Emery
Avatar
-Martin- #2
Member since Jan 2009 · 422 posts · Location: Bayern Germany
Group memberships: Members
Show profile · Link to this post
Simply open the css file in your template directory. Then cange "font" and/or "font-size".
Linux-Doku.de
Avatar
ach (Administrator) #3
Member since May 2006 · 1904 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
In reply to post #1
Quote by Anton Emery on 2009-08-13, 22:15:
i am trying to increase the overall font size for our wiki

With a good template it would be simply changing one single line in one of the css files. But your template or rather the generic global styles unfortunately uses font-sizes with pixels. :(
Otherwise you'd be able to simply put
div.dokuwiki {
    font-size:120%;
}
But I'm afraid, you'll have to go through each (or a least a lot of the) corresponding font-size and change it to its bigger equivalent.
Avatar
freecicero #4
Member since Apr 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Rather than start a new thread, this is my exact question.  I know it was asked a long time ago and I am thinking maybe the answer has changed, and there is a new way to do this?  I am using the WRITR theme and the fonts are all VERY large, and i have to dial down to 80% to make it look decent in my browser, but I want to change the default. I don't have a userstyle.css file in my /conf directory, and after looking at the DOC page on the WRITR template I am still at a loss to find such a basic setting.

Is there conceptually a better way to approach this in 2018 as to default fonts and font sizes?

I can probably figure it out if there is a sample userstyle.css file somewhere I can modify.  Is there one?  And it's not possible to modify this from the user control panel, correct?

Thank you!!!
Avatar
turnermm (Moderator) #5
Member since Oct 2009 · 4399 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
I don't have a userstyle.css

You have to create it yourself.  And check the dokuwiki template css/basic less for example of how to set the default font settings.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
freecicero #6
Member since Apr 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Thank you!
Avatar
JamieMN #7
Member since Apr 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Recently set up DokuWiki myself and I wanted the font-size changing too.

I've read up and attempted the userstyle.css method but must be missing something..

either it's not in the right place (\wiki\conf )? but I've tried in a few other places.

Or do I need to do something after I've put in the .css?

Or I've possibly done the actual css file wrong? I've seen lots of different recommendations from the below for div.dokuwiki { then font-size, to body {
can someone confirm what the correct way would be? I want to amend font size (excluding headers) to be 11px (0.688em I believe)
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4399 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
It goes in <your_dokuwiki>\conf
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
JamieMN #9
Member since Apr 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Ah, then it's been in the right place but it hasn't changed.
I presume it must be the code then.
Avatar
turnermm (Moderator) #10
Member since Oct 2009 · 4399 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Have you marked it important:

font-size: 12pt !important
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
JamieMN #11
Member since Apr 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Tried, didn't seem to work

At the moment it's:

body {
font-size: 20% !important
}
Avatar
turnermm (Moderator) #12
Member since Oct 2009 · 4399 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
div.dokuwiki {
    font-size:120%;
}
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
ach (Administrator) #13
Member since May 2006 · 1904 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
This really depends on the template. Since I wrote my comment in 2009 we got a new default template with which you can do what I wrote. There are various ways but you can put this into your userstyles to change the size of everything:
  1. body {
  2.  font-size: 100%;
  3. }
(For example, this changes the base font from the equivalent of 14px to 16px.)

But the Writr template is based on px and is also mixing different units, so is not flexible enough to support this. When you change the font size that way, it will change the size of some elements but not all, which will make it look broken.

If you're asking for other templates, it really depends. It could work with body or div.dokuwiki or not. And it could work in general or it might not. You might need an !important, you might not.
Sorry for the bad news.

So, if you'd like to know how it works in your template or if it works at all, you will have to tell us which template you are using or give us a URL to look at.
Avatar
JamieMN #14
Member since Apr 2018 · 5 posts
Group memberships: Members
Show profile · Link to this post
Still not had much luck. Relatively new to Dokuwiki so still trying to figure out the templates, mind you. Not sure how I'd be able to tell the WritrTemplate but I've noticed my buttons are smaller font sizes (I.e. Media Manager / Site Map)
I haven't changed anything except the admin > Template Style Settings. So I presume it'd just be the default template.

https://mnlive.co.uk/wiki/

Location and content:

https://i.imgur.com/Yq8MKWq.png
Avatar
ach (Administrator) #15
Member since May 2006 · 1904 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Quote by JamieMN:
Still not had much luck.
[...]
https://mnlive.co.uk/wiki/

Why are you saying that? Everything looks bigger as expected (except in the sidebar where text is smaller than usual).
But I just noticed that the text size would not change in mobile view. Maybe that is what you're seeing?

If you would like your text to be the same size in mobile view as in desktop view, you only need to add an !important, e.g.
  1. body {
  2.  font-size: 120% !important;
  3. }

But if you'd like the font sizes to be different, you will have to do that in a different file. Add the following to a file in the same folder called 'userall.less':
  1. body {
  2.     font-size: 120%;
  3. }
  4.  
  5. @media only screen and (max-width: @ini_phone_width) {
  6.     body {
  7.         font-size: 100%;
  8.     }
  9. }
That is only for the default template (which is the one you are using). Other templates will probably have slightly different ways for mobile styles.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-12-17, 14:01:45 (UTC +01:00)