Advertisement

Web Design Archives

Unlock the Power of CSS List Menus

Unlock the Power of CSS List Menus

CSS List Menus

At one time, most websites had simple text links. Even an experienced web designer would, at best, organize some type of simple text list or table for their menu. If they wanted something more fancy (i.e. mouseover effects or image backgrounds) the only way to accomplish it was with an external plugin, such as Java. That often slowed websites to an unusable state.

CSS changed all of that, providing web designers with styling flexibility in lists, particularly when used to make menus. Without using Java, Flash, or even Javascript, you can have elegant looking menus that are fast and standards-compliant.

Getting Started

First we should define a few terms. A “list” in HTML lingo refers to the sets of tags used to list a number of items, either sequentially or not.  A sequential list is called an “ordered list” and is represented by the <ol> tag.  A non-sequential list is called an “unordered list” and is represented by the <ul> tag.  In web browsers, the default ordered list will have Arabic numbers and look like this:

  1. Roger
  2. Lila
  3. Cal
  4. Ming

An unordered list will use bullets by default and look like this:

  • Eggs
  • Cheese
  • Milk
  • Bread
  • Juice

The first step to creating a list menu is to make the actual list in your HTML file. Create a div container for the list, which will allow you to place it where you want on the page.  The <ul></ul> tags will surround each list item <li>:

<div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="store.html">Store</a></li>
<li><a href="contact.html">Contact Us</a></li>
<li><a href="links.html">Links</a></li>
</ul>
</div>

Next, add id’s to the list tags to identify them in your CSS file.

<div id="navcontainer">
<ul id="navlist">

For a basic navigation list, that is all you have to do to create it. If you want to manipulate backgrounds, colors, hover actions, and more, the rest of your work will take place in the CSS file.

CSS Settings

Find a good spot in your CSS file, or create a new one. Begin by adding the navcontainer id and assigning a width to it:

#navcontainer { width: 200px; }

The next step will be to specify the style and attributes of the unordered list as a whole:

#navcontainer ul
{
margin-left: 0;
padding-left: 0;
list-style-type: none;
font-family: Verdana, Arial, sans-serif;
}

Rather than displaying a style of bullet or numeric character, “list-style-type: none” will remove all list-item markers and leave only the words in the list.

The next items to configure are the list items themselves. In this case, you will style any list item in the container with an “a” link tag.

#navcontainer a
{
display: block;
padding: 3px;
width: 160px;
color: #fff;
background-color: #1A5101;
border-bottom: 1px solid #E9F1D9;
text-decoration: none;
}

The element “display: block” tells the list item to take up the full width allowed for it and to place a line break before and after each item. This will essentially make vertical buttons. The “text-decoration: none” removes the underline from the link.

Finally, specify the style of mouse-over for the buttons. In CSS the mouse-over effect is called “hover”, and an item’s style can be changed however you like, when the mouse pointer hovers over it. In this case, we will only change the background color and text color.

#navcontainer a:hover
{
background-color: #DEF1DE;
color: #1A5101;
}

That is all it takes to create a vertical menu using CSS. If you would like to try out your own versions, you can download the HTML and CSS files and customize them however you wish.

Horizontal Menus

With just a few lines of code, you were able to create a vertical menu with CSS.  You can use a similar process to create a horizontal one. The first thing you should know is that you do not have to change the HTML code at all. You can use the exact same HTML file and just change the tags in the CSS file to morph your list into a horizontal menu.

For the horizontal list, you will apply styles to the #navlist id rather than the #navcontainer. Changing the list from vertical to horizontal actually only requires one small tag change from “display: block” to “display: inline”.

#navcontainer {
padding: 0;
margin: 0;
text-align: center;
}

ul#navlist
{
background-color: #1A5101;
padding: 5px 0 5px 0;
white-space: nowrap;
font-family: Verdana, Arial, sans-serif;
}

#navlist li
{
list-style-type: none;
display: inline;
}

#navlist a
{
padding: 3px;
}

Notice the “white-space: nowrap” element, which prevents the list from wrapping at the end of the line when there is white space. Also notice that you can remove the “width” setting, but you are free to add a height setting, if you want to change the height of your menu.

Like the vertical menu, the next step is to specify the colors and behavior of the links and mouse hover effect.

#navlist a:link, #navlist a:visited
{
margin: 0 3px 0 3px;
padding: 1px;
color: #fff;
border: 1px solid #fff;
text-decoration: none;
}

#navlist a:hover
{
background-color: #DEF1DE;
color: #1A5101;
}

With just those CSS tags, your vertical menu will now be a horizontal menu. You can view the HTML and CSS file for the horizontal menu and customize it to your liking.

Background Images

If you have a particularly fancy website, you may find simple solid background colors for your buttons to be too plain. With CSS you can create background button images for normal and hovered states, without using javascript or any other additional code. We will use the first vertical menu example as our template and only change a few settings.

First, create images, and make sure they are the exact size of the buttons you want to display on your page. Create one button  image for the normal state, save it, and then alter that image (i.e. make it lighter, darker, or a different color) and save it under a different name for the hovered state.

In the “navcontainer a” tag, you need to add a “background-image” element that will take the place of the background color:

#navcontainer a
{
display: block;
padding: 3px;
width: 160px;
color: #fff;
background-image: url(images/normal.png);
background-color: #1A5101;
border-bottom: 1px solid #E9F1D9;
text-decoration: none;
}

Next, edit the “navcontainer a:hover” tag to use the hovered state image:

#navcontainer a:hover
{
background-image: url(images/hover.png);
background-color: #DEF1DE;
color: #1A5101;
}

Now, each button will have a background image that may look like any type of button you want, depending on your graphic design, and will also seamlessly change to another image when hovered.  Be sure to keep the image file size small so that there is no delay when users hover their mouses over the buttons.

There are a multitude of other styles and techniques for making CSS list menus.  Experiment, find new ways to beautify your websites, and share your discoveries.

Joomla Template Design

Joomla Template Design

Joomla Template Design

Last week, we learned the basic structure of Joomla templates, how they interact with Joomla’s backend, and how to make a very basic template.  Now that you have basic template creation mastered, you will most likely want to make a full template that can actually function on a website and give you all of the flexibility in options and design that you need.

We will cover five steps of Joomla template creation: creating the templateDetails.xml file, organizing the structure of your document, creating CSS styles, adding graphics and background images, and finalizing your template for personal use or public distribution.

1. Create the templateDetails.xml file

This file is very important, and your template will not function properly without it.  In templateDetails.xml, you will declare the name of your document, author, copyright, all of the modules, image files, and extra css files.

Although knowledge of XML is helpful, you can learn it very quickly, even if this is your first time.  Unlike HTML, XML tags can be anything and are used to define data.  For example, the first tag in the templateDetails.xml will be <name></name>.  Here you will insert the name of your template: <name>MyTemplate</name>.  Follow the same method to enter the version, creation date, author, author URL, copyright, license, and description. Take a look at the example file to see how the first section should look.

The next part of the templateDetails.xml file is used to declare any files in the template package. This includes index.php, css/templates.css, any image files, and even the templateDetails.xml file itself. To declare a file, use the following method:

<filename>css/template.css</filename>

and

<filename>index.php</filename>

Notice that you must use the relative path in relation to the templateDetails.xml file, so an image file, for example, will be in images/image-name.png.

The final section in the templateDetails.xml file declares module positions.  This is very important because only modules declared here will appear in your backend.  All you have to do is list the ones you want to use.  For example:

<position>right</position>

See the example document for possible module positions.  Ultimately, you can decide what positions actually exist and where they will be placed in your HTML template.

2. Organize Your Structure (index.php)

In the previous part of this series, you learned about jdoc statements and how to place them in the index.php file, which is the primary HTML template document. Creating the HTML structure is completely dependent on your needs and your aesthetic taste, but you should know how each jdoc statement will display its contents, as this will help you find an appropriate spot to place it.

  • Header: This should contain the title as an image banner or text and should link back to the Home page.
  • Top elements: Top elements include the breadcrumbs or pathway and the top menu.  Typically, these will be defined by a series of DIVs.
  • User elements: You can place one, two, three, or even four user boxes on your site.  These can theoretically contain any module, although they are typically used for “latest news“, “top articles” and other leading modules.  This might also be a good spot to place third-party modules, like a frontpage slideshow.  Typically, user modules will be page-specific.  In other words, you might place the modules on the frontpage but not on full article pages.  All of those settings are controlled in the menu settings of Joomla’s admnistrative backend.
  • Left and right modules: As the names indicate, these modules are usually placed on the left and right respectively inside of floating DIVs.  Both are optional, and depending on the size and structure of your site, you might have both, one, or neither.  Module types include the login module and syndication module.
  • Footer: This is something I usually create manually to include my own site’s copyright license information, bottom text menu, and possibly links to a sitemap and other text-only documents.

3. Create Styles

The css/template.css file will contain all of the styles for your entire site.  As a result, the document can get quite long, and you should take care to organize it thoughtfully.   There are two ways to approach this.  The first is to separate it into sections: structure (size, width, etc) and visuals (colors, fonts, and images).  The other approach is to follow the structure of the index.php file, listing all of the styles according to their actual positions on the site.

4. Add Background Images and Graphics

All background images should be established inside your CSS file, rather than in the index.php document.  You should also declare any images you create in the templateDetails.xml file.

Because your template.css file is inside a subdirectory of the main template directory and the images directory is in another, you need to make sure to link images using the proper relative path.  For example, an image named header.jpg should be linked in a style like this:

background-image: url(../images/header.jpg);

That will tell the server to go up a directory to the main template directory and then go into the images directory.

5. Finalize Template

Once you have all of your components complete, there are a couple of steps you should take to finalize your template.  The first is to upload it and test it.  Simply copy your entire template directory to the “templates” directory on your website.  When you go into the Joomla backend, you should see your template listed.  If everything looks fine, take a screenshot of the template and save that screenshot to the local template folder on your computer.  Resize it to about 200px wide and save it as template_thumbnail.png.

Make sure you have all of the necessary folders and extra files, most of which you can copy from a default template (see the first article of this series).  Once you do, create a zip file of your entire template folder, saving it as the name of your template (i.e. MyTemplate.zip).  If you decide to distribute your template, users only have to upload your zip file, and it should install correctly.

Joomla template creation can be fun and rewarding, whether you use your new templates for personal use or decide to sell them.  Once you have made a few practice templates and feel comfortable making them, you should be able to truly customize Joomla to meet any needs of the websites you design.

Introduction to Creating Joomla Templates

Introduction to Creating Joomla Templates

Creating Joomla Templates

Joomla is a powerful yet easy to use content management system that is free to download and open source (allowing free customization).  It is has become a very popular choice for web designers because, like many modern content management systems, it allows the designer to fully turn over control of the site to the client, after the template design is finished.

The reason clients love Joomla is that they can configure it from within a user-friendly web-based control panel and easily add extensions to it. Users add extensions simply by uploading the zip file provided by the extension developer, and Joomla’s website includes a catalog of over 5,000 extensions.

Usability Tips for Web Designers

Usability Tips for Web Designers

Tips for Web Designers


There is no doubt that good web design takes creative ability and reasonably good programming skills, and there is no shortage of truly stunningly attractive websites. But an important aspect of web design that is often overlooked is usability. The sad reality is that sometimes the most attractive sites are the most difficult to navigate and most inaccessible.

A good web designer can make an attractive site, but a great one can make a website that is fast loading, easy to use, and appropriate for its intended audience.  What follows are some basic tips for website usability.  This is only a starting point, and will not take the place of a full usability study.

To Flash or Not to Flash

To Flash or Not to Flash

Adobe Flash Player has been around for over a decade and has become the unofficial standard medium for delivering animation and streaming video. Many individuals have challenged its effectiveness, but no challenges have been taken as seriously as Apple’s. Steve Jobs has made it clear that Apple has no intentions of running Flash on their iPhone or iPad.


As we enter into the second decade of 21st Century web design, one cannot help but ask the question: Is Flash still needed?  Should web designers use Flash, and to what extent?

Some of the Best Essential Tools for Web Designers

Some of the Best Essential Tools for Web Designers


Tools for Web Designers

Web designers help us to create WebPages that will undergo series things like designing, coding, testing and editing. Creating webpage needs essential tools that should help the designers to create a webpage and there are many designing software like adobe, flash, maya that can be used to design a webpage which will ultimately lead to a website. In those days web designers used only windows operating system for web designing but now they are using MAC operating system which is getting more popular among the user as well.

1. Graphics Design

Adobe developed more software for web designers to create a better webpage and in that Creative suite is a very popular software for web designing as it helps the creator to create a wonderful webpage. Flash is software of adobe which is used to create online games, 2D games etc. let us see some of the essential tool that can help in creating a webpage. snagit options is used instead of spraying grab it will capture entire webpage so that we can edit that page or we can add color to that page. We can also share that page in FTP or Flicker.

22 Essential Firefox Add-ons for Web Designers

22 Essential Firefox Add-ons for Web Designers

Firefox Add-ons

Firefox web browser is widely used all around the world because it provides add-on facility which can be used by web developers and designers.

Let us see 22 essential Firefox add-ons,

1. Firefox for Web Developers

Web developer’s extension can be used in Firefox browser and it is considered as a great tool for web designers. Firefox provides essential tools which can be used to code quality web sites and also we can troubleshoot the errors easily. Web developers perform certain action that can be added to the browser such as web developers tools can be a perfect add on to the browser. This added tool can be used to edit CSS which is in the fly menu. We can also edit certain things like font, color, padding, margin, border with the help of CSS and it can be effective in the web developer tool as well and also the changes can be seen instantly using web browser.

Beautiful Icon Sets for Free

Beautiful Icon Sets for Free

Icon Sets

Get different ideas for your icon set all for free. Our website is designed to bring some of the best deals in bright and glossy bundle icon sets that come in high pixel. These are set in perfection and give you great results. Choose among the various forms of classified styles and have the best ones figured out for your own self. Some icons may be grungy while some may be tad rugged while still others would look like the typical icons. The artsy icons are some of the best to try out.

1. Artsy Icons: These are the special affects with paint brush strokes and artistically developed icons that make for incredible impressions. The sketchy icons are also popular choices among the artsy types and they help to create a breakthrough among the usual forms of icons that are common. With artsy icons these are rather individualistic and enchanting on their own. They make enhancing notches when one is using them or placing them on their sites.

Free Web Templates

  • eWebGazette - Free phpLD Template
  •  PremierPro - Free phpLD Template
  • UltimateClean Free phpLD Template
  • CoolBlue Free phpLD Template
  • BlueSpot Free phpLD Template
  • BizJournal Free phpLD Template
  • Fashion Store > Free osCommerce Template
  • BusinessPro
  • DynamicBiz
  • Web Hosting Company
  • Travel World
View All Free Web Templates

Free WP Themes

  • ElegantRed – Free WP Theme for your Blog on any Niche/Topic
  • Angry Birds – Free WP Theme
  • GlowingCircle – Free WP Theme
  • IdealHome – Free WordPress Theme
  • GlowingRed – Free WordPress Theme
  • Tech Noise – A Free WP Theme with a Dynamic Multi-color Scheme
  • ElegantTech – Free WP Theme for your Blog
  • ClassicCars – Free WordPress Theme
  • FashionWear – A Free Premium WordPress Theme with Multiple Color Schemes
  • HealthTips – Another Elegant Free WP Theme
  • TravelWorld – A Free WordPress Theme
  • WebGazette – A Free WordPress Theme
View All Free WP Themes>