473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Expandable FAQ - change of font and size

Hi

I'm using the code below for an expandable FAQ but I want to change the font of the Answer to a slightly smaller size and to something more standard like 'Arial'. I just feel this will make it 'cleaner' when there are lots of FAQs listed together.

I'm new to code and am trying to teach myself but this has stumped me. Any suggestions on how I can adapt what I already have or where I have gone wrong would be much appreciated:

Expand|Select|Wrap|Line Numbers
  1. <p> <script type="text/javascript"><!--
  2. function toggleMe(a){
  3. var e=document.getElementById(a);
  4. var i = document.getElementById(a + '_image');
  5. if(!e)return true;
  6. if(e.style.display=="none"){
  7. e.style.display="block"
  8. i.src = 'http://findicons.com/files/icons/2581/metro_icons/48/minus.png';
  9. } else {
  10. e.style.display="none"
  11. i.src = 'http://findicons.com/files/icons/974/glyphish/15/plus.png';
  12. }
  13. return false;
  14. }
  15. // --></script> </p> <p><a style="cursor:pointer;" onclick="return toggleMe('para1')"><span style="font-size: small;"><span style="font-size: x-small;"><span style="font-size: small;"><img id="para1_image" style="border:0;margin-right:5px;vertical-align:middle;" src="http://findicons.com/files/icons/974/glyphish/15/plus.png" alt="" width="10" height="10" /> Test Question </span></span></span></a></p> <div id="para1" style="display:none;">Test Answer</div> <p><a style="cursor:pointer;" onclick="return toggleMe('para2')"><span style="font-size: small;"><span style="font-size: x-small;"><span style="font-size: small;"><img id="para2_image" style="border:0;margin-right:5px;vertical-align:middle;" src="http://findicons.com/files/icons/974/glyphish/15/plus.png" alt="" width="10" height="10" /> Test Question number Two. </span></span></span></a></p> <div id="para2" style="display:none;">Test Answer number 2</div>
Feb 11 '15 #1
0 1069

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: kmunderwood | last post by:
I am having trouble changing the font size when extracting xml into an html web page. I think it can be done so many ways, that my searches bring up examples that I am not familiar with. I am a...
16
by: Coder Droid | last post by:
I'm trying my first table-less site, and I've bumped my head up against a wall. I can't change the font size within a div. Real quick, my style sheet has: -------------------------------------...
15
by: lharby | last post by:
Basic question, is this possible? I have managed to crib a javascript function that allows the user to increase or decrease the font size of a page. (see...
2
by: Bjoern | last post by:
Hi all, how can i change the Font Size of the Text in my Label. I will change it dynamic in the code. I tryed: int number = 11; label1.Font.Size = number; But this is not possible because Size...
5
by: VB Programmer | last post by:
How can I change the font size of a text box dynamically? I tried this but it didn't work. It said 'Size is Read-Only'. Any other ways around this? Here's the code: txtDisplay.Font.Size = 10
2
by: Dave | last post by:
How can I change the font size of a label? I have: Label1.Font.Size = "12" but it's telling me that property 'Size' is readonly. Thanks,
1
by: ken | last post by:
Hi, How do you change the font for the data labels on your bar graph report/chart? I have 24 series, and when I change the font of the data label for one series that does not change them all......
3
by: # Cyrille37 # | last post by:
Hello, Font.Size Property is readonly. How can I change the Size of a Font ??? Thanks for your help cyrille
5
by: _Who | last post by:
I spent all day yesterday trying different things. Something has happened so I can't change font size. I have a table and in the first cell I have only text. I tried using the cell's Style...
3
by: reyo | last post by:
Hi, i design a dynamic web page.infact it will be a css generator. i have a question about visited link. i want to change color,font-size,font-weight etc. of a link when it is visited. when a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.