Start learning with our library of video tutorials taught by experts. Get started

Joomla! 1.5: Styling with CSS

Styling the login box


From:

Joomla! 1.5: Styling with CSS

with Jen Kramer

Video: Styling the login box

Now that we have got our homepage looking great, I am going to style the Login Box to make it match the nice look that we have going on, on the right side of this page. This is the default styling for the login box and the little border that you see going around the Username and the Password is from the Field Set tag, if you haven't encountered that particular HTML tag before. We have two links at the bottom. You may have three depending on how you have your Joomla! configured. I have my Joomla! configured to not allow registrations on the website.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Joomla! 1.5: Styling with CSS
2h 29m Intermediate Jan 09, 2009

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.

Topics include:
  • Using the Firefox Web Developer toolbar
  • Styling Joomla! modules
  • Styling a multi-page article
  • Creating horizontal and vertical menus
  • Incorporating images in menus
  • Styling banner ads
Subjects:
Developer Web CMS Web Development
Software:
Joomla!
Author:
Jen Kramer

Styling the login box

Now that we have got our homepage looking great, I am going to style the Login Box to make it match the nice look that we have going on, on the right side of this page. This is the default styling for the login box and the little border that you see going around the Username and the Password is from the Field Set tag, if you haven't encountered that particular HTML tag before. We have two links at the bottom. You may have three depending on how you have your Joomla! configured. I have my Joomla! configured to not allow registrations on the website.

If you have registration on the website enabled, you may have an extra bullet at the bottom that says to sign up for an account essentially. So let's go ahead and get started with styling this login box. So we are going to go to CSS > Edit CSS. And I am going to go to the default.css page and I am going to scroll down to the right area of our style sheet. Well, you have a lot of styling in here for the featured products area and now we are going to add styles here for the login.

So I am going to start by styling the outside box, which of course is always a div.module table. I am going to set a width on this around 220 pixels which will make it a little bit narrower, and a smaller font size because we want to deemphasize this login box relative to other things on this page. I am also going to set a background color, which will set off the box just a little bit from the rest of the page itself. Now, we have our words and our boxes running up right against the edge of that colored box.

So I am going to need to add some padding. Let's also push the box over, so that it lines up nicely with the Our featured products on top. Right now it's skewed a little bit to the left. We can do that with margin, and finally let's separate that login box from the Our featured products. We will give a little margin on the top. Now I am going to style my H3, and actually I want my H3 for the login to look pretty similar to the H3 that I have for Our featured products. But I'd really don't want that left styling. In Our featured products, we have a big set of padding on the left side that's associated with H3, and we have a dark color as well.

So I am going to setup my H3 for the login box as a separate style. So right div.moduletable h3. Let's give it a color of white and the Georgia font that we have been using, which is font family, Georgia and Serif. Once again, we want it more of a normal weight. So a font weight of normal, which will make it less bold, and a size of 14 pixels. Now, let's get rid of that ugly field set border that you see around the Username and Password.

So once again, right div.moduletable field set, and we will just set the border here to None. Now, I would like to style this login box down here to match other buttons that we have had on the website. I am going to make it brown. So right div.moduletable input.button. Generally speaking, all of the buttons on a Joomla! website have the same class of button. Let's set the text color to white, which is fff, and we will set our background color to Chocolate Brown, 463 11c. And finally, we will set the border around that button to None.

Now finally, these last two links on the bottom here for Forgot your Password or Forgot your Username, they are kind of far apart and I would like to do a little bit more with the alignment with them. So let's work on styling the list that's in this login box. So right div.moduletable ul, we want to list style type of None to get rid of the bullets. Then we are going to put some padding just on the left side, 0 0 0 and 5 pixels.

This gets rid of some of the residual padding that we have had associated with this before based on other styling further up in the style sheet. And finally, let's set the margin to 0. That will help with some other web browsers. Finally, I would like to put just a little bit of padding around those individual links. But again, I am going to override what I have earlier for the LI tag for some of the spacing between list items. So this will be right div.moduletable li.

This time, we are going to set our padding to 0.3 ems and that will tighten things up nicely. Now, we have a nice clean line going down the left side from Username down to Forgot your Username. So as our last step, we need to copy all of our CSS and put it into our Joomla! template. So Ctrl or Command+A, Ctrl or Command+C to copy all of our code. Then we will switch to the back end of the website to Extensions > Template Manager, to Inside, Edit, Edit CSS, Default, Edit and now, we are going to say Ctrl or Command+A, Ctrl or Command+ V to paste in our changes and save.

Now, let's Refresh the homepage, and you will see that all of our changes have been incorporated into the website. So login box is very handy for hiding some content away for just registered users, which I will show you how that works in the next video.

Find answers to the most frequently asked questions about Joomla! 1.5: Styling with CSS.


Expand all | Collapse all
Please wait...
Q: I’m having trouble understanding the role of the Start Level/End Level function in developing a menu, as described in the  “Styling Menus Vertically” video.  What is the key to understanding this function?
A: The Start Level and End Level are the way a menu is segmented, to show all or part of that menu.

By default, the Start Level and End Level are set to 0. This means that the entire menu will show.

If you would like to have just the top level navigation show (perhaps for a top menu bar), but none of the secondary, tertiary, or deeper navigation, set Start Level to 0 and End Level to 1.

If you would like to have just the secondary navigation show (i.e. you're in the "about" portion of the site and you'd like to have the about secondary navigation show on the left side of the page), set the Start Level to 1 and the End Level to 2. If you'd like to show all of the navigation (secondary, tertiary, and any deeper navigation), set the Start Level to 1 and the End Level to 0 (i.e. infinite).

The only tricky part about setting the Start and End Levels is that zero means different things in different locations.

For the Start Level, zero means the very beginning of the navigation. Engineers start counting with zero, while we are normally taught to start counting with 1, so this may be the cause of some confusion.  This means that 1 actually corresponds to the second level, 2 to the third level, and so forth.

For the End Level, zero indicates "infinity", or however far out the navigation goes.
Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Joomla! 1.5: Styling with CSS.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

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.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked