Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
As we promised from the last video, we would like to add some pictures to the Our Featured Products menu to make this menu just a little bit prettier and get some pictures on the Home page. First of all, we need to go to the backend of Joomla! and we need to configure our menu items to be associated with some pictures. Then we'll need to come back here to the Home page and do a little bit more styling. So let's go to the backend of Joomla! and let's go to Our Featured Products, which is in the Module Manager. Our Featured Products is the title of the module that's driving that menu. Inside of Our Featured Products, there is a setting under Other Parameters which says Show Menu Images. We're going to set this to Yes. That's all we need to do here to make this start to happen. Now click Save.
Now let's go to Menus and we're going to go to the home menu, which is the Our Featured Products menu on the home page. We're going to go into each of these menu items and within this editing screen on the right hand side there is a drop-down for the Menu Image. So for Hot Chocolate, we're going to choose homechoc.jpg from the drop-down and click Save. For Chocolate Truffles, we're going to go to hometruffles.jpg.
Finally for Pastilles, we're going to go to homepastille.jpg, and Save. Now let's refresh the Home page of the website and see how it looks. The images have been added to our menu and this doesn't look so bad, but I think we can clean it up and make it look just a little bit prettier. Let's go ahead and start editing the CSS for the Our Featured Products menu. Edit CSS, under default.css, let's scroll down to the right area, the right module styles. The first thing I want to do is get rid of that brown border around the whole box, I think, it's a little distracting. So I'm going to take out my border code for the h3 and I'm going to take out the borders that appeared for each of the individual links themselves.
Now I'm going to get rid of that padding again that I have around the entire link. What I would like to do is to have that image with the color not even showing around the image. I want it to look more like the picture on the end of a colored strip. So I'm going to scroll back up to my link in visited state where I have padding of five pixels and I'm going to get rid of that. Now what I would like to do is I would like to float the image that's here to the left and this will push my text up, all the way to the top of the image. Then we're going to need to add a little bit of padding to move it back down to the middle of the image. I would also like to add a little bit of margin to the side of my image, so that my words are smashed right into the edge of the image.
So to do this, I'm going to need to add another style. So for images in the div.moduletablehome, we would like them all to be floated left and we would like to add some margin. So now it's looking really funny and that's because we have these floats in place that we're floating the image and the text, and then we're floating the next image, and so forth. That's why this is looking a little bit odd.
Now we need to clear that up with our Clear Property. I'm going to add that Clear Property to our links in our visited state. Note the narrow color bar that I have associated with those. That's also a function of the float that's in place. So what I need to do is define a height to the links themselves and that will make the color bar, the same height as the image, if I pick the height of the image. To do that, all I have to do is right-click on the image and say Properties, and it will tell me that the dimensions for that image are 68 x 68 pixels.
So I'm going to make the height of my link and my visited link, 68 pixels. Now we have all of the color in place. So now all I need to do is make those white words appear towards the middle of the image. Remember that oddball span tag that we had inside of all of the HTML associated with this list. I'm going to use that to give me a little bit space on the top. So I'm going to take that span and the first thing I'm going to do is make it display as a block, which spans by definition our inline elements. So we need to make sure that we're going to display this as a block, otherwise we can't add any padding to it. Then I'm going to add some padding on the top, 25 pixels should do it. Now those are nicely aligned in the middle.
The very last thing I would like to do is the Our Featured Products title is pushed all the way over to the left and I would like to wind it up with all of the other words that are there in the menu. So the 'O' in "Our" lines up the 'H' in "Hot". So to my h3 style, which is just up here a little bit further, I'm going to alter the padding, so that we have 5 on the top, none on the right, 5 pixels on the bottom, and 78 pixels on the left. That's looking much better. Now all we have to do is copy these styles into Joomla! So once again, Ctrl+A or Command+A, Ctrl+C or Command+C to select everything and copy it. Then we're going to go to Extensions > Template Manager, the inside template, Edit CSS, default.css, and once again, Ctrl+A or Command+A, Ctrl+V or Command+V, and Save.
So now Our Featured Products is looking much more graphically oriented, and much prettier, and it has a larger draw for the eye to this webpage. You can use these individual styled links in combination with the image based menus or you can use them separately on your website. You don't have to have images only with individually styled links. You could, of course, put images on any of the menus on your website.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 102031 Viewers
61 Video lessons · 88755 Viewers
71 Video lessons · 72570 Viewers
56 Video lessons · 104214 Viewers
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.
Your file was successfully uploaded.