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

Code for font size increase/decrease?

Unread postby CaptNink » Tue Apr 08, 2008 6:38 pm

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
CaptNink
 
Posts: 12
Joined: Mon Mar 13, 2006 8:30 pm
Location: Abbotsford, BC, Canada

Unread postby Dean Whitlock » Tue Apr 08, 2008 9:34 pm

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
User avatar
Dean Whitlock
 
Posts: 577
Joined: Thu Sep 01, 2005 5:59 pm
Location: Thetford Center, Vermont USA

Re: Code for font size increase/decrease?

Unread postby Malcolm Jacobson » Wed Apr 09, 2008 1:27 am

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.
Malcolm Jacobson
 
Posts: 289
Joined: Wed Oct 18, 2006 3:17 am
Location: Brisbane, Australia

Unread postby Tim Green » Wed Apr 09, 2008 9:25 am

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
Tim Green
Site Admin
 
Posts: 19549
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Unread postby CaptNink » Wed Apr 09, 2008 10:38 pm

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.
User avatar
CaptNink
 
Posts: 12
Joined: Mon Mar 13, 2006 8:30 pm
Location: Abbotsford, BC, Canada

Unread postby Malcolm Jacobson » Thu Apr 10, 2008 12:45 am

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

Cheers,

Malcolm.
Malcolm Jacobson
 
Posts: 289
Joined: Wed Oct 18, 2006 3:17 am
Location: Brisbane, Australia


Return to Help & Manual 4 Forum

Who is online

Users browsing this forum: No registered users and 3 guests

cron