48 Hour Sale: Save 40% on ALL products for the next 48 hours! Use the coupon: SEPT40  Sale ends in
Joomlashack

The Blank Template CSS for Joomla

Tutorial 4: The Blank Template CSS for Joomla

Reprinted with permission from Compass Design: Valid W3C joomla template designs for your website

In an earlier section, we discussed a slightly different design process. Instead of creating the design and then doing the CSS layout, we will be doing it the other way round, the Joomla CSS first. We are doing this because we want to make an blank CSS template file that can be reused by anyone.

Let's startout with a basic blank template, no layout, just all the font typography styling. This is a blank template to help speed production of a site. Its not a production template CSS file , all styles shouldn't be filled in, ones that don't get used should be deleted before using. This blank CSS file has several features:

CSS Shorthand

There are 'shorthand' styles at the beginning of each style definition. Once you have figured out the styles, fill the shorthand versions in and delete the long versions. The syntax is:

font: font-size |font-style | font-variant | font-weight |
line-height | font-family

Here is an example, rather than this...

font-size:100%;
font-family:Arial,Helvetica,sans-serif;
font-style:italic;
font-weight:bold;
line-height:130%em;

Have this:

font: 100%/130% Arial,Helvetica,sans-serif italic bold;

Read more at An Introduction to CSS shorthand properties about this syntax.

Global CSS Reset

At the beginning of this joomla CSS file is a few styles that set all styles to certain characteristics. You then have to over-ride these later on. The first key global style is:

* {
margin: 0;
padding: 0;
}
body {........
font-size: 76.1%;........

Everything is given a zero margin and padding and then font size is set to 76.1%. The reason font is set here to 76.1% is to try and get more consistant font sizes across browsers. All font sizes are then set in em's further down. A link that discusses this idea:

An experiment in typography at The Noodle Incident (Owen Briggs)

Header Tags and Joomla CSS Titles

Sometimes I will have Joomla titles turned off and use h1/h2 tags in content. Usually I am doing this to get a SEO bonus*. To get some consistancy across titles depending whether I have the off or not, I'll define the Joomla CSS alongside the hX tags. For example:

h1,.componentheading {...

This is personal preference, you could certainly separate them out.

*I have realised I could get a further SEO bonus by keeping the Joomla titles to show in parameters and then hiding them through a CSS style, and making the titles linkable. Any of these would work:

display: none;
height:0;
text-indent: -3000px;

Note that there is some discussion regarding hiding text with CSS. Please read this if you are considering it!

Joomla Rounded Corners

Towards the end of this blank template CSS file is the code to have rounded corners. Its the same technique used at joomla.org and requires the module suffix contained in index.php file to be "-3".

OK, ready? So here is the blank CSS template. Note it doesn't include any layout, we'll be looking at this next time.

The blank template CSS file for joomla is free for you to take and use. If you do, maybe drop me an email to show your project.

Now, how to use this blank CSS file? Well, after you have done all your joomla CSS styling, your file will have all that extra empty CSS. Just use this tool to get rid of it. Be careful and do a test to make sure you know what it does first!!

CSS Formatter and Optimiser

A preview from our next joomla tutorial

Tutorial 5: Making a 3 column Joomla Theme for your joomla website
In this joomla tutorial, we will look at a 3 column theme for your joomla website. Most joomla websites use 3 columns and having the theme start with that is a good foundation. Then later we can hide side columns if there is no content in them for that page.

Joomla template design from Compass Design� 2005 Compass Design/Barrie North, December 2005.
Barrie creates valid joomla template designs at his consultancy, Compass Design

Presenting at Dutch Joomla Day

The second Dutch Joomla! Days will be held on December 8th & 9th 2006, in Den Bosch, The Netherlands. Day one will focus on Joomla! in business. The second day will be the Joomla! Community day. Several key Joomla! community members will attend the conference - among them six core team members and a surprise guest.

Our own Barrie North will be at the event, presenting a brief outline of some of the new features of template design in 1.5. If you are in the area, drop by and say hi!

Continue Reading

Community Announcement

Greetings and Happy New Year to all!

This purpose of this letter is just to fill you in on some changes to come in 2006 and to recap our first year with the Joomla! community.

Community AnnouncementA lot of us have a new sense of freshness, especially since the Joomla/Mambo rebranding and Id like to personally thank the entire community for such a great success on the behalf of Joomlashack. There are so many success stories I can't even begin to list them individually. Because of you, in just the past 3 months we were able to move our data do a dedicated server, create 8 free templates for the community, 20 variations of commercial templates and assorted modules as well as helping to launch over 60 Joomla powered sites, assist in the development of 3 community sites and donate over $1,000 in donations to victims of hurricane Katrina. Again, thank you! This would have never been possible without such a dedicated community and excellent camaraderie among other Joomla! developers..

Continue Reading

Server Updates

Rochen HostingIf you're a frequent user here at joomlashack you may have noticed our server was performing rather slowly and sometimes not at all for the past few days. Those days are over now. Thanks to Brad Baker and Chris Adams of Rochen, we are back on track with a lighting fast system in a brand new home right next door to Joomla!
Rochen Engineered Hosting is the same great company that houses the websites at joomla.org and we're proud to support them. Thanks for bearing with us while we migrated over. We hope this didn't set anyone back. You can now browse this site with better speed and reliability.

Joomla! Jargon

Dictionary.com defines jargon like this:

1. jargon: -noun, the language, esp. the vocabulary, peculiar to a particular trade, profession, or group: medical jargon.

It also defines jargon like this:

2. jargon: -noun, unintelligible or meaningless talk or writing; gibberish.

Joomla!'s roots go back a few years, and it definitely has a language all its own. Seasoned veterans are fluent in Joomla! jargon, but for "newbies", that second definition is probably the most appropriate definition for what Joomla! jargon really is. For that reason, I have decided to attempt to compile a list of the most commonly used words and/or phrases in Joomla!, and give them a definition that actually means something to a non-veteran Joomla! user.

Continue Reading

Linux World Expo London 2006

Well, another successful week in the Joomla! universe.

In case you didn't hear this week in London Joomla! had bestowed upon it for the second year in succession the Best Linux / Open Source Project award by LinuxUser and Developer Magazine

The event itself was a rip roaring success literally hundreds of (if not a few thousand) people turned up at the booth eager to learn about Joomla! in general and Joomla! 1.5b in particular. The first public unveiling of Joomla! 1.5b had tongues wagging and imaginations soaring, the heartening thing was that people just simply "got it". Day one was spent on our feet, I got to London early afternoon and headed straight to the Exhibition centre suitcase in hand to be met by fellow Joomla! community member Mitchell Annable (Nottingham UK) and Joomla! core developer Johan Janssens (Diest Belgium). I was there five minutes before Johan turned to me and said "Man the booth I need to go hire a tux for tonight" - So in at the deep end for me! From minute one it was non stop I didn't get a breather, not even a drink of water, until late afternoon. By this time Johan's fellow core team members Peter Russell (Leeds, UK) and my buddy Louis Landry (New Orleans, USA) had also returned to the booth, although we didn't get a chance to even say "hello" to each other for at least two hours. Day two was a little quieter (but not much) and it was fun to see Johan holding an impromptu conference over at the Drupal booth sharing ideas and answering questions while Peter and Louis went and did some PR "work" with the LinuxUser and Developer magazine booth babes - check out the pics over at Joomla.org

From a Joomlashack perspective it was great to meet a some of the UK based Joomlashack community that popped by to say hello, it's always nice to meet people in person and hear that we're doing a great job - so a big thanks goes out to those that I met

How to use Google Adwords on a Joomla website

If you have a website (Joomla or otherwise), and you have a vague interest in getting traffic, then pay per click (PPC) need to be part of your Search Engine (SEM) strategy.

Why is pay per click so useful? If you put an ad in a magazine about your product, you pay the magazine the add fee and it goes in. At that point you are hoping that the ad is compelling enough to get people to call/email/visit your site. If you get no leads from the ad, then you still had to pay the magazine the fee.

Continue Reading

Joomla Errors and the www. Domain Mismatch

Many Joomla users, particularly newbies (newcomers or beginners), fall victim to a variety of issues which have the same root cause. The so called www domain mismatch causes a wide variety of issues such as login failures (both core and Community Builder logins, and administrator logins), WYSIWYG editors failing to load or failing to save content, javascript execution halted with error messages. At Joomlashack our own Flash based JPG Rotator is triggered by javascript and this module is amongst those affected.

Continue Reading

 

 

Since 2005, Joomlashack has been a leading supplier of free and commercial Joomla templates, Joomla extensions, and Joomla Training.
Joomlashack.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.