Code for font size increase/decrease?

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
CaptNink
Posts: 12
Joined: Mon Mar 13, 2006 8:30 pm
Location: Abbotsford, BC, Canada
Contact:

Code for font size increase/decrease?

Unread post by CaptNink »

I want to create a couple of buttons in the header of our Help file that when clicked, will increase or decrease the font size of the topic.

Has anyone done something like this in H&M? I've tried looking on the 'net for some code samples, but I can't get anything to work.

Thanks!
User avatar
Dean Whitlock
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA
Contact:

Unread post by Dean Whitlock »

Hi Capt.,

The only think I can think of is to have the buttons be links to alternate pages that have the same text styled in a larger style, or that use a different topic template that has been edited to add CSS codes for larger fonts. If you embedded the topic contents from the original topic, you would only have to edit it in one place, but you couldn't change the styles on the text. Using the alternate topic template might allow you to embed and restyle the size with CSS - not sure about that, but it's worth a try.

Good luck, and let us know what you come up with.
Dean
Malcolm Jacobson
Posts: 289
Joined: Wed Oct 18, 2006 3:17 am
Location: Brisbane, Australia
Contact:

Re: Code for font size increase/decrease?

Unread post by Malcolm Jacobson »

CaptNink wrote:Has anyone done something like this in H&M? I've tried looking on the 'net for some code samples, but I can't get anything to work.
The code here:

http://www.white-hat-web-design.co.uk/a ... ntsize.php

works fine.

Cheers,

Malcolm.
User avatar
Tim Green
Site Admin
Posts: 23153
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Unread post by Tim Green »

Malcolm, Nink,

Note that for this to work you may have to change the font coding setting for your HTML output in Project Properties > HTML Help/Browser-based Help/HTML Export Options. Right-click on the coding option for a description of what the different settings do.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
CaptNink
Posts: 12
Joined: Mon Mar 13, 2006 8:30 pm
Location: Abbotsford, BC, Canada
Contact:

Unread post by CaptNink »

Thanks for the posts.

I put the javascript code into my project and adjusted the font encoding to px, but it still doesn't work right—it only increases and decreases some parts of the text, not all.
Malcolm Jacobson
Posts: 289
Joined: Wed Oct 18, 2006 3:17 am
Location: Brisbane, Australia
Contact:

Unread post by Malcolm Jacobson »

It will only work if your Font Size Encoding is set to % or em.

Cheers,

Malcolm.
Post Reply