Viewers: in countries Watching now:
Custom templates are the key to making a Joomla!-driven website stand out. In Joomla! 1.5 Creating and Editing Custom Templates, Jen Kramer McKibben offers instruction and insight to help Joomla! users create eye-popping websites. Jen starts with the basics, like how to add the Joomla! template codes to a static HTML layout, install the template package, and clean up styling after installation. She also shows how to make multiple layouts within the same Joomla! template, configure menus and submenus, and more. Exercise files accompany the course.
Now that we have taken care of our content styling for the site, I am back on the homepage and I am looking at the module that is on the left side of the page for Latest News. You will notice though, that some of the changes that we made in our last movie have already taken effect here on the homepage. So instead of the 'Bliss No. 5 All Natural Chocolate' being small letters and black, they have taken on the white Georgia look that we assigned else where on the website. But right now I would like to concentrate on the Latest News code over on the left hand side of the page.
The best way to start by looking at this is to view the HTML once again. And let's just once again Ctrl or Command+F and we are going to find Latest News, which we see down here. We have a surrounding div called left and another div inside of that called moduletablenews with an h3 for the latest news. And then we have some table based content that contains the actual title of the article, and then the body of the article after that.
The table content here is left over from the original version of Joomla!, which was very heavily table based. And the Joomla! team is working on getting rid of all these various tables in future releases. But for right now, we are going to have to deal with them that they are here. So first of all, let's go back to our main look of the website here and let's use this Web Developer toolbar to start by outlining our various block level elements on this page. So one of the things that you can see is that some of the surrounding divs go all the way across the left hand side, right on about even with the edge of the pink bar here. That's a little bit wide and I think we want to narrow that up a little bit, between the Latest News and the news over here on this side of the page.
Also to put more emphasis on the text on the right hand side of the page, I think we want that text to be a little bit larger so we want to reduce the size of the text over here on the left hand side to make it a little bit smaller just in this Latest News area. We will also want to restyle the Latest News title itself, which is just that default h3 which is a little bit ugly, and we will want to put a little bit of space here between the image and the main text itself. We can do all of this with just a few styles. So once again, let's flip back to our HTML view, and if we look at the div of the class of moduletablenews, this goes completely around both articles. So a great way to reduce the size of the whole left hand column, is going to be to resize that moduletablenews to a smaller dimension.
We will refresh the page here to get rid of all these outlines, and then I am going to go to CSS > Edit CSS and to the Default tab. And I am going to find the part of my style sheet that starts to talk about the left side of the page. And then I am going to add to this, left div.moduletablenews, which is the name of that big div that goes around all of the text for the latest news. I have played around with some widths a little bit and when I decided that a width of 240 pixels is going to work well for this.
So as you see that comes in just a little bit. I would also like to make the font size of everything overall a little bit smaller. So let's make the font size of 0.85 ems. Again, I have done some of this trial and error ahead of time. And finally we need some padding clearly here, in this particular view. Let's add some padding. Remember your CSS shorthand. T, R, B, L is the order, the top, the right, the bottom and the left, which stands for trouble. If you remember the accurate, then you will stay out of trouble.
That's our quick shorthand for padding. So we need to have 30 pixels on the left, 0 pixels, 0 pixels, and 20 pixels. And now put that in a nice position there in the web page. Next let's take care of that big heading for the Latest News overall. So once again, we want to pound left, a div.moduletablenews, and then this is the h3 that's located within that div. The reason I am being this specific is because I may have an h3 elsewhere on the site that I want to look slightly different. But the one for the module table news, I want to look this way.
So once again, I think I would like to make its color to be white and to keep with the rest of the look of the site, let's also make it Georgia again. And maybe the font weight is a little bit much over here. Let's make the font weight normal. That looks wonderful. We definitely need a little bit space between those images and the small articles. Let's add a style for that, #left div.moduletablenews img, and I am just going to put a quick little margin around those images.
I would like a bit of a margin to the right side of the image and maybe a little bit on the bottom as well. That looks fabulous! The last thing we have is to take care of all those titles, The Return of the Bliss Bar and the Bliss Boxes. They don't really stand out; they just blend in with the rest of the text. So I think we need a little bit of a style to make those titles stick out a little bit more. But we don't want then too big because we don't want it to compete with the words Latest News. So once again, #left. contentehadingnews, which is the tittle of those headlines.
Let's try making them bold. Well, I think that is really all we need there. If I make them white, they are going to compete too much with the Latest News. So let's close off the style and I am pretty happy with the way this looks. Once again, I am going to Ctrl or Command+A, select everything, Ctrl or Command+C to copy, switch back to the my back end of Joomla!, and I am going to edit the style sheet once again, the default style sheet. Ctrl or Command+A, Ctrl or Command+V, and save.
And when I flip back to the site here and refresh, all of our styles have taken effect. Styling the news is exactly the same path as styling the content. Once again we wanted our content to be a little bit more prominent and a little bit bigger than our Latest News over here on the side. So we made the text a little bit smaller and we kept the colors to black so that they would blend in with the background a little bit better, and we use white very sparingly. It's also always nice to put a little bit of space between your image and the text itself. Well, just a little bit of breathing room really makes things a look lot better. Use these same rules on your sites.
Find answers to the most frequently asked questions about Joomla! 1.5: Creating and Editing Custom Templates .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.