Very Cool CSS Background Images

I’ve been playing around creating some cool background images which I’m pretty stoked with – These will be used in our upcoming Joomla template – this one is going to be something special. A sample below to get you excited!

Detail View Of Background Image

Full View

Changing Fonts In A Joomla Template

Something I’m asked quite often is how to change the font on a Joomla site. I thought I’d write a quick post about it because it’s an easy thing to do, but there are also some limitations. There’s also one other option for using cool typefaces on your Joomla site which I’ll touch on at the end – It’s called sIFR and uses flash and JavaScript to display a custom typeface. sIFR is really just good for headings as large blocks of type should not be rendered with flash.

Before we delve into how to make the changes it’s important to understand how fonts are displayed. Fonts in web pages are not embedded into the web page itself as many people think. The font must be on the end users computer to be displayed. The way it works is the template designer (or web site designer) will enter the font(s) they want to be displayed but it must be on the visitors computer to work.

This is why pretty much all web sites use one of the 10 or so standard fonts that are available on pretty much all computers – they include Ariel, Verdana, Times, Courier, Tahoma, Georgia, and a few others.

Quite simply all you need to do to change the font in your Joomla Template is edit the font list in your template css file. The css file is in your template folder on your live site – It is usually in a directory called “css” inside the template directory:

yoursite.com/templates/your_template_name/css/template.css

But, this depends on the designer who built your template as it’s not mandatory to structure files like this. It is good practice however and if you got your template from JoomlaBear then this is where you’ll find it.

  • If you are using Joomla 1.0+ then your main template css file should be called template_css.css.
  • If you are using Joomla 1.5+ your template css file should be named template.css

The simplest way to edit this css file is to do it through the Joomla admin. Joomla provides a nice method to access both your template index.php and template css file from the template manager.

  • In Joomla 1.0 go to Site > Template Manager > Site Templates -Then select the template you are using from the list by clicking the radio button and hit Edit CSS.
  • In Joomla 1.5 go to Extensions > Template Manager -Then select the template you are using from the list by clicking the radio button and hit Edit from the top menu. On the next screen hit the Edit CSS button at the top right of screen.

Depending on how the designer structured the CSS file you may need to change font specifications in a number of places inside the template css – especially if you want to change heading styles. Typically the base font will be declared in the body tag like this:

body {
	font-family: Verdana, Arial, sans-serif;
	font-size: 12px;
	color: #CCCCCC;
	line-height:20px;
	background-color: #222222;
}

You can see in the example above that we have two fonts declared – Verdana and Arial – in this example the viewer of your site will see Verdana if they have it installed, and if not the viewers computer will try to use Arial – remember these fonts must be installed on the users computer to be seen on the web page. If Verdana and Arial were not available then the viewers computer would try to use any available sans-serif font installed. Neat eh!

Other common font-family combinations include:

font-family: Arial, Helvetica, sans-serif;
font-family: "Times New Roman", Times, serif;
font-family: Geneva, Arial, Helvetica, sans-serif;

And you can mix and match these as much as you like!

Sans-serif fonts are the straight and simple ones like Verdana and Arial – Serif fonts, like Times and Times New Roman. are the ones with little curly or pointy bits. An interesting fact is that sans-serif fonts are typically much easier to read on screen while serif fonts are easier to read in print! Have a look at any novel and you’ll see what I mean. However this is not true when the fonts are displayed at larger sizes so my recommendation is to go with a simple sans-serif font like verdana or arial for the body text and have fun with type faces like Trebuchet MS, Times, Tahoma, etc for your headings.

If you want to edit the heading font in your template css it will be exactly the same as above except you will need to locate the style in the css – you can do a quick “find” and search for “font-family” – if you whip through all instances of this you will find the heading styles pretty quickly. Or with Joomla you can be quite confident that your heading styles will be contained in one of the following styles:

h1
h2
h3
.componentheading
.contentheading

These are the default classes used for headings.

Hopefully this has been helpful – If you really, really want other typefaces in your template you can look at sIFR, which stands for Scalable Inman Flash Replacement. sIFR uses flash, css and javascript to replace blocks of text on your site. Its a cunning technique that I’ll be delving into further on this blog and using in some our fine Joomla Templates. Stay tuned.

 
JOOMLA TEMPLATES Joomla Templates By JoomlaBear