Viewers: in countries Watching now:
Joomla! 1.5: Styling with CSS shows how those familiar with Joomla! and with hand-coded HTML and CSS can take the next step in creating a dynamic website with a unique look and feel. Jen Kramer McKibben goes deep into the functionality of this open-source content management system, exploring topics like putting more style into modules, editing CSS on the fly using the Firefox Web Developer toolbar, creating horizontal and vertical menu layouts, and including images in those menus. Exercise files accompany the course.
Banner ads are a common addition to many websites today and Joomla! has a great built-in banner ad functionality. I am going to show you how to set up some banner ads for your own website and then we are going to style them just a little bit to make them look a little bit better on our webpage. So I am going to hop into the back end of Joomla! and I am going to go to the Components > Banner > Categories. Now banner ads have two pieces in Joomla!. You actually configure the banner ads themselves within the Components area and then under the Module Manager there is a module that determines where that banner ad will actually be displayed. The idea is that you can have several banner ads that rotate in the same position, so that when you refresh the page a different banner ad will come up.
First you have to establish a category for your banner ad. So I am going to add this category. We can call it anything you want but I am going to call it the left banner ad. Once our Category is established we can establish a client. And my client is going to be lynda.com. So we need to complete the Client Name, the Contact Name and the Contact Email Address. There is a box over here for putting any extra information that you may want to save about this banner client in your website. But I am not going to add anything at this point. Then hit Save. Now we are ready to configure individual banners.
Earlier in the Media Manager there is a folder here called banners and inside of the banners folder, and if you are running the Exercise File these images should be there, we uploaded three separate lynda.com images which we are going to use as our banner ad for the website. These are all the same dimensions and vary really only in the background color. I am going to back to Components > Banner > Banners. I am going to click New and I have to give my banner a name. So first I am going to put together the black ad, which I am just going to call lynda black. I do want it to show. Sticky has to do with whether that banner ad is going to stick at the top of the rotation or not. And I am going to set that to No. We have to assign it a Category as well as a Client Name.
Finally we are going to select our banner image from the list and we have three to choose from here, the black, the white, and the yellow. So I am going to pick the black. A small preview pops up here on the bottom. You can assign a width and height but I am going to do that in CSS elsewhere and there is a Tag functionality here that we are not going to use on this particular website. Now I am going to save. Rather than retyping all of those settings for the other two banner ads I am just going to check next to lynda black and I am going to copy and I am going to copy again and then I am just going to modify my copies with the other information for the other banner ads. So I am going to change the name here of this one to lynda gold. I do want the banner to show.
I am going to erase the alias. It will put in an alias for me later. And all the rest of this information remains the same until I get to the bottom. This time I am going to pick the Y or yellow version of the banner ad and I will save. And finally in my last copy this will become the lynda white ad. Now I will get rid of the alias. Yes, I want the banner to show and then skip to the bottom where I will set this to white. So now I will save. The next thing I need to do is create a module for my banner ad. So I am going to go to Extensions under the Module Manager and I am going to click the New button to make a new module.
This will be a type of banner and as you see a note here, the Banner module allows you to show the active banners out of the component within your site. So I am going to put in a title, banner ad. I don't want that title to show though. I do want it enabled and I want it on the left side of the page. I am specifically going to put it on my Products pages and once again I held down my Shift key to select all of the items under Products. On the right side of the page I would like this to open in a new window with browser navigation. I want one banner ad to show at a time.
My banner client is lynda.com and the Category is left banner ad. I am not going to use the Search by Tags functionality and I do want this to Randomize. So I am going to switch this to Sticky, Randomize. That's pretty much all we're going to need to do. So let's save this and we will go back to the front end of our website and refresh. So now you can see our banner ad down here in the bottom of the page. But it's kind of shoved all the way far to the left side of the page and if I outline all of the block level elements, you will see that this is inside of a div that extends the whole width of the page.
So what I need to do is make the div a little bit narrower and then put in some padding on the left side to push this over to make the edge of the banner ad even with the secondary navigation. I am going to refresh to get rid of the outlines. So now we are going to go to CSS > Edit CSS, Default and I am going to put this in the left area of our style sheet. So here under Left, I am going to put in left div.moduletable because that's the code that's surrounding my banner ad. I am going to set the width to 162 pixels and then I am going to put in some Padding. Let's put 3 ems on the top and let's put 40 pixels on the left.
That gives us a little bit of breathing room between the secondary navigation and the left edge of the banner ad is nicely in line with the left of the secondary navigation. Now all I have to do is drop this CSS into my Joomla! style sheet. Ctrl or Command+A to select everything, Ctrl or Command+C to copy. Now I am going to go to the back end of the website to Extensions > Template Manager, the inside template, Edit > Edit CSS, default.css, Edit, Ctrl or Command+A to select everything. Ctrl or Command+V to paste, and save. Now when I go back to the front end of my website and refresh you will see that the banner ad is in its new position and every time I refresh I get a different a banner ad.
Occasionally I will get the same one twice in a row. And that's just the nature of choosing a random banner. So banners just sometimes are a necessary evil for a website but Joomla! makes them really easy to set up and easy to keep track of how many impressions have been served up to the website and how many click-throughs you get. Don't be afraid to experiment with finding the right spot on your website for this banner ad. I think this is working pretty well down on the lower left but you could have tried it in the top or even in the footer.
Find answers to the most frequently asked questions about Joomla! 1.5: Styling with CSS .
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.