Fonts, Sizes & CSS

  • 1
  • Question
  • Updated 7 years ago
  • Answered
Hi
I have two questions

1. Is it possible to change the style default font, e.g if a style has a default font arial and I would like to use verdana at present I have to manually change this via the toolbar it would be so much easier and quicker to be able to change the default.

2. How can I use the font size pt instead of 2, 3, 4 etc, e.g using verdana size 2 is 10/11pt which for me is to big, arial size 2 is just right but I don't want to use arial, ideally I would like verdana 9pt. Is there any css I can use to achieve a site wide or page command.

If the two questions above are possible please may I have the answers for free and silver accounts

Thanks
Photo of David

David

  • 465 Posts
  • 94 Reply Likes

Posted 7 years ago

  • 1
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
Hello David,

You can change the default font and size with css.

I'm not sure what you mean by size 2 -- Here is a good resource for determining what size is what http://sureshjain.wordpress.com/2007/...

I think with a silver account you can simply use the css editor to add the code below.

body {font-family: verdana; font-size: 9pt;}

With a free account wrap it in style tags and add it to a html widget at the top of each page.

<!--
<style type="text/css">
body {font-family: verdana; font-size: 9pt;}
</style>
-->

Obviously change the 9pt to any size you like (px, pt or em)

Any questions just ask

Lee.
Photo of David

David

  • 465 Posts
  • 94 Reply Likes
Hi UK Duke
Thanks for a prompt reply, just to clarify I own a free site and manage a silver site, question 1 was directed at the silver site which I have now changed the body command for and tried a text widget on a new page and the font, size and colour are now to my requirements so that's good.
Question 2 was directed at the free site, I mislead you by saying size 2, I actually meant small as per the toolbar. With your help I've worked out the code I need for this site below and introduced it in a HTML widget

<!--
<style type="text/css">
body {
font-family:Verdana,Helvetica,sans-serif;
font-size:11px;
color:#000000;
}
</style>
-->

It works with new text widgets but not retrospectively on the existing text, can you think of a way for this to happen or will I have to go through all my pages and copy and paste into new widgets to get the new default font,size and colour I want?
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Hi David

I'm happy that the code is working on the Silver site.

With regards to the free site, you will need to add the code in an HTML Widget on each page so that it changes the font elements for the page. The reason you don't have to do this on Yola Silver, is because it changes the site CSS, whereas only the page CSS will change on the Free site.

Hope this helps.

Nazlie
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
It sounds to me like the text that is not getting effected has 'inline' style attached to it.

For example if I had this code...

<!--

<style> body {font-family: verdana;} </style>

<span style="font-family: arial;">Hello</span>

-->

The text 'Hello' would use arial as the font face as it is the last style it has been told.

You will need the css on each page if you are using the free method.
If you copy out the existing text into a notepad (not word) and then copy it back in it should lose all of it's 'inline' style.

Hope this helps

Lee.
Photo of David

David

  • 465 Posts
  • 94 Reply Likes
Yes it does, thanks, I thought I would have to redue all the existing text its a good job I only have about 10 pages.
Thanks for your help.