printing a number on click

  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

I have a site in which I want to add one of the "pick a font size" buttons to change the css.
I was thinking about using inbeaded styles and getting PHP to print the font size (in pt) depending on what was clicked I am just not sure how to do this...

Since my site users em for the rest of the font sizes I will only need to change the body font.
  • Nightslyr
  • Proficient
  • Proficient
  • Nightslyr
  • Posts: 283

Post 3+ Months Ago

tastysite wrote:
I have a site in which I want to add one of the "pick a font size" buttons to change the css.
I was thinking about using inbeaded styles and getting PHP to print the font size (in pt) depending on what was clicked I am just not sure how to do this...

Since my site users em for the rest of the font sizes I will only need to change the body font.


What do you mean by 'print'?

You can change the font size of a site relatively easily by simply using JavaScript and some external CSS files. Store the majority of your site's styles in one file, then have other files that store the font size. Next, simply write a few onclick handlers that will replace the source of the current CSS font file with another.
  • tastysite
  • Proficient
  • Proficient
  • User avatar
  • Posts: 349
  • Loc: Brighouse, West Yorkshire, England

Post 3+ Months Ago

I have seen this done using php but that would work to, if I knew any javascript.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 90 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.