with Lorelle and Brent VanFossen

Shareware and Freeware Software Programs

We survive using shareware and freeware software. Don’t you? You should.

Shareware and freeware software are programs available for download from the Internet that are either cheap or free. Before you start shaking your head and think that this is some kind of advertising ploy, it isn’t. We have been using shareware and freeware software for over 15 years and we are proud of what these incredibly brilliant individuals or small groups accomplish with little or no money which has proven to be invaluable to thousands of people – and in some cases, millions of people.

Freeware is software created for a purpose, usually a small, specific purpose, that is free to anyone on the Internet. No charge, Free. No cost. That’s right. Totally free. These run the gamut from simple little utilities to sophisticated programming. The people who do this just want to give something back, your basic altruistic folks. Freeware is free to use, but it is still copyright protected. The source code rights remain with the developer and designer, but the use of the program for non-commercial use is free. For those who use freeware for commercial use, the developer expects a fee, rightfully so.

Shareware is similar to freeware, but it can run from simple little utilities to full-size, over-developed professional software that makes our life easier when working on the computer or cruising the Internet. Shareware is software that is usually inexpensive and is used on a “try before you buy” concept. You can typically use the trial software for 15 – 30 days before it stops working or nags you endlessly to either pay-if-you-use-it or remove it from your system. Some shareware programs will work partially crippled, so you have an idea of how it could work, while others will work completely until the deadline to buy is up. Others will work indefinitely, but you are encouraged through “nag screens” to buy the software if you are going to use it.

Shareware and freeware is based on the concept of trust and respect – the honor system, so to speak. If you like it, they expect you to pay for it. What you pay may be set in stone or may be flexible and considered a donation. Amounts range from USD$5 to hundreds of US dollars. It is estimated that today, the shareware industry makes about USD$300 million annually. The Association of Shareware Professionals is represented by about 1200 members internationally.

One of the interesting ideas behind shareware (and freeware) is entrepreneurship. Someone or a small group of people has an idea for a program that will do something that people should need. Let’s use the example of WinZip. In the 1980s, people started creating files that were bigger than the micro-sized hard drives and floppy disks available at the time. Some files just didn’t break up conveniently into little sizes for floppy disks. Someone decided to create a program that would compress a file to make it smaller. Since most programming languages have spaces built into their programming code, the developer found a way of shrinking down the wasted space to compress the information. Suddenly a 2 megabyte file could shrink to 1.2 megabytes or more! This was useful, and it continues to be useful even today with gigabyte hard drives and storage units. Winzip now installs to incorporate itself into your computer’s operating system so that with a right click on any file from almost any program, you can bundle together multiple files and directories and compress (zip) them into one single file. Millions of people use Winzip to email zipped files across the Internet every day. What started out as a good idea became a million dollar success story.

The History of Shareware in Brief

According to the Association of Shareware Professionals (ASP), Jim Knopf and Andrew Fluegelman created two different programs in 1982 that they decided, independently, to offer free for trial and asked for donations to be made to keep the energy going behind the programs. Jim Knopf’s PC-File, a database program, took off and the concept of shareware was born. Before Knopt and Fluegelman’s shareware concept took off in the early 1980s, the idea of freeware had been going for over ten years. Many programmers developed small utility-oriented programs that they distributed among themselves and to anyone who was interested, not ever expecting to make money from the process. The early on favorites were Winzip, PC-File, PC-Write and PaintShop Pro, among many others.

You have to remember, the overwhelming popularity of shareware came as a result of there being little or no alternatives in software choices. Microsoft hadn’t made its mark in the world, so shareware was extremely popular as people tried different types of software to see if they liked it for free and cheap. It was a world of risk and chance, but also opportunity. As Microsoft and WordPerfect (later to become Corel WordPerfect) started expanding from the simple to the more sophisticated suite packages with word processing, graphics, desktop publishing, spreadsheets, and databases all combined, interest in shareware waned. Until the passion for play took over.

Games became the next big ticket for shareware software writers. Doom, Wolfenstein, and Quake become practically overnight successes as shareware gone wild. You can still purchase shareware at computer stores and online, as well as download a wide range of programs still being created to fill in the gaps left by big professional software packages.

Shareware and Freeware We Can’t Live Without

Let’s tell you about the shareware and freeware we can’t live without and then tell you how to find even more shareware and freeware that may service your specific needs.

Winzip
I’ve been using Winzip for almost 15 years and can’t live without it. There are now a variety of other zip (file compression) programs out there, but Winzip remains a core favorite. It will recognize and work with most zip Winzip Windowprograms including the older ARC, PKZIP, and WinRAR programs. Winzip is simple and easy to use, allowing you to compress a single file or multiple directories of files into one single compressed file, great for sending files over the Internet. I used to use it to put huge files onto floppy disks and now I use it to get multiple deep file directories onto CDS and DVDs. My CD burner will not record directories (folders) past three deep, so if I have any files below c:/directory1\subdirectory2\subdirectory3, the directory of subdirectory3 will be listed but the folder will be completely empty of files, giving me no end of heartache during a recent computer crash, since Windows stores many files 4-6 directories deep. I now use Winzip with its “save path information” ability to backup my entire directory with all the subdirectories into one file and then copy that single file onto CD or DVD for backup. Fifteen years later and it is still incredibly valuable. It is frequently updated and gets better and better with time! A must have for any savvy computer user.
PaintShop Pro
Having teethed on the early versions of MacPaint and Adobe PhotoShop, I thought I had found the end of the rainbow in graphic design capabilities with PaintShop Pro. I’ve used it for years and it continues to improve its quality and capabilities. Working with thousands of photographs annually, it does the job simply and easily, with actually a low learning curve. Until recently, it was one of the few programs that featured a catalog “browse” feature, allowing you to see thumbnails of every graphic within a folder. Competing against the success of this shareware program, Adobe has now added this feature to PhotoShop. There are some things that PhotoShop does that PaintShop Pro doesn’t, but there are many things PaintShop Pro does that PhotoShop races to catch up with. If you do any graphic work, especially if you work with digital photography, get PaintShop Pro!
HotDog Pro
HotDog Pro screen shotAll of our Website was developed and designed with HotDog Pro. I’ve been using it since 1997, if memory serves. It is an amazingly powerful HTML editor with built-in features to keep you up-to-date with accessibility and web standards. It comes with a built-in page viewer, though I tend to use Internet Explorer, which is an option, to see what I’ve created with my coding. It features a variety of automatic code features from table and form wizards to do-it-yourself hints. If you are serious about web page design and want to step away from word processing programs and desktop publishing programs that “say” they will export to HTML, give Hotdog Pro a try. It isn’t for the faint hearted, but once you get a grip on the process, it makes it fast and simple to create outstanding web pages.
Javascript Maker
Javascript Maker is a handy utility software that takes HTML coding and coverts it into a Javascript. We have a lot of redundant content on our web pages and Javascript Maker allows us to create handy menus and information we can insert into our web pages. The call out for the script is listed on the pages, and if we need to make a change in the information held within the script, we change the script and not every single page. Working with almost 500 web pages on our site, this tool makes things so simple and easy to do. For instance, the menu items you see along the left side of this page in our “Connect the Dots” column, most of these are actually javascripts. The one shown list this article and other related articles is called Internet Tips and Tricks and uses a Javascript called “internet.js”. When I update a page within the Internet series of articles, instead of manually changing every page within the series list, I simply make an addition to the internet.js script and every page is automatically changed when the page loads the Javascript. Simple and easy!
Advanced Batch Converter
Working with Advancd Batch Converterthousands of photographs annually, it can be a pain to resize and change the resolution to hundreds of photographs I add to our web pages constantly. Using Advanced Batch Converter, I divide the horizontal images from the vertical images into separate directories and then run them separately through the program, choosing the optional output versions of my choice. I can take a load of jpg files and convert them to gifs. Or resize a bunch of jpgs down to 150 pixels wide from whatever their original size was. I can change them from color to grayscale and sharpen the focus as I go (resizing from huge file sizes to small sizes often requires a tiny sharpen). If you are dealing with a lot of graphics or digital photographs, get this program!
InfoRapid Search and Replace
While HotDog Pro and many other HTML editors allow multiple file search and replaces, few HTML editing programs allow multiple file search and replaces of Javascript files. On occasion, I need to not only to search and replace content within Javascript but also word processing documents and text files. InfoRapid Search and Replace is a freeware program that allows excellent multiple file search and replace features of just about any type of file. It is fast and easy to use, and extraordinarily powerful!
Smart FTP
I have tried a lot of FTP programs for getting our web pages up on the Internet, and some are great and costly, and others are sucky and horrible. One of the top rated FTP programs wiped out much of my online files, so I have done a lot of research and trial and error to find a worthy program. A free program, Smart FTP, is highly regarded in the online world and I have to say that it has won my vote. It is fairly simple to use, designed for uploading and downloading FTP files. It’s ability to restart after being disconnected is great, and it hosts advanced features such as directory uploads and que lines. If you upload or download a lot of FTP files, give this program a try.
WordPerfect Macros (freeware)
While Microsoft Word has taken over the world, Corel’s WordPerfect continues to do battle and in my mind, and the minds of serious writers and word processing users, WordPerfect continues to win that battle, no matter what the sales figures say. If you need a serious word processing program for mail merges, mailing lists, writing complex reports, books, and even desktop publishing, get WordPerfect. But none of this has anything to do with freeware and shareware, except for the fact that there are many places to find free WordPerfect templates, macros, and other bells and whistles that make life easier for WordPerfect users. I use many of these macros and templates in my day-to-day work and adore them.

WinRAR
Another file compression program, we are now using both WinRAR and Winzip as our zip file programs. WinRAR has a few features that Winzip currently lacks, though competition may change things. WinRAR is very popular in Europe and Asia for its heavy duty file compression controls. You can control the output size of the compressed file which will break it up into specific sizes for floppy disks, CDS, or other file restrictions.
Clipmate
ClipmateOne of the most frustrating features of most Windows-based programs is their horrible lack of capability to hold more than one piece of information in the clipboard. For instance, if you are editing a document and you need to cut and paste this paragraph here, and that word there, and then move this section to that section, you have to do each change one at a time, moving all over the place, back and forth. Clipmate is a program that sits in the memory and stores everything you cut and copy in its database. With a couple of clicks you can paste the different elements in, storing dozens of bits of copy waiting for your command to paste it in. It handles not only multiple cuts and copies, but allows you to change the order in the list and then do a “power paste” of everything in order. It is an incredibly powerful program that I have used for years and can’t live without. It helps me in my word processing programs and HTML editing programs, among others. If you are a power computer user, get this shareware!

Shareware and Freeware Downloads

Shareware and Freeware Resources

Top Specialty Search Engines List

Specialty search engines and directories are targetted towards a specific audience and their needs. Typically, medical directories feature medicine and medical information and resources. Travel-oriented directories only list travel-related topics. Be sure and read the fine print and criteria to ensure your site qualifies. Some of these specialty directories require a low fee, but most on this list are free.

To help you with your web page submissions, we’ve included this listing of specialty search engines and directories, as well as lists for the most popular search engines and directories, small but unusual search engines and directories, Website award submission sites, and we even have a Microsoft Excel spreadsheet which combines all these lists into one easy-to-use layout form for downloading.

For more information on how to prepare your Website and web pages for submission to search engines and directories, take time to read our article series on web page validation and preparation for search engine submissions. We also have listed extensive information in our article series on web page design to help you create the best possible “search engine friendly” and user-friendly Website.

Top Search Engines List

When it comes time to submit your website to search engines, it helps to have a list. The number and variety of search engines change rather quickly, but here is a general list of the top search engines with some information on where and how to submit to each search engine.

To help you submit your site, we’ve provided a downloadable EXCEL file we use for monitoring our website submissions and this list of the most popular search engines. We’ve also included a list of smaller websites as these can often grow quickly and every listing you can get will help spread the word about your site.

This list includes basic instructions for submission, the time delay before your site might be seen on the site, and any notes and comments. The file includes the lists we have posted on our web site as well as a listing of the top international search engines. Where possible, we’ve included the partners for these search engines. If you are listed with a partner, you usually show up in the main site. Be careful oversubmitting your site to such partnerships as it can be seen as “flooding” or oversubmitting, resulting in restrictions or a ban.

Before submitting your site, take time to read through our series of articles on Validating Your Web Page, especially the article on Getting Ready for Search Engines to maximize the quality of your submission and understand how the process works. The harder you work before you submit, the better your changes are later. It is much easier to change your site now then try to change it once the search engines have it in their databases. Do it right the first time.

Have your submission information ready before you submit your and category possibilities. To help you, we have an example form in our article on site submission and you can see our own submission form online.

Google
Partners: Dmoz
Submission Site: http://www.google.com/addurl.html
Submission Method: 4 weeks

Yahoo
Partners: Google (soon to end), Overture
Submission Site: http://www.yahoo.com/info/suggest/
Notes: Soon linked with Inktomi

DMOZ
Partners: Google, Netscape, Teoma, Hotbot, Ask Jeeves, AOL Search, Altavista, Alltheweb
Submission Site: http://dmoz.org/add.html
Submission Method: Manual

All The Web
Partners: DMOZ, Fast
Submission Site: http://addurl.alltheweb.com/add_url

Fast.com
Partners: Lycos, Hotbot, Terra.com, alltheweb, dogpile, Excite, Infospace, Overture
Submission Site: http://www.fast.com
Time Delay: 6 weeks

Altavista
Partners: Overture, DMOZ
Submission Site: http://addurl.altavista.com/addurl/new
Time Delay: 1-6 weeks
Notes: Submit 5 pages at once for free

AOL Search
Partners: Google, DMOZ
Submission Site: http://search.aol.com/aolcom/index.jsp
Time Delay: 2 months
Notes: Submit within categories

Teoma
Partners: Google, DMOZ, Ask Jeeves
Submission Site: http://www.teoma.com

Ask Jeeves
Partners: DMOZ, Teoma, (soon: iWon, Excite, My Way)
Submission Site: http://www.ask.com

Hotbot
Partners: DMOZ, Overture, Inktomi
Submission Site: http://www.hotbot.com
Time Delay: 2 months

Excite
Partners: Inktomi, Overture
Submission Site: http://www.excite.com
Time Delay: 2 weeks

Looksmart
Partners: Inktomi, SearchFeed, myGeek, ABCSearch, InfoSpace, Mamma.com
Submission Site: http://search.looksmart.com/

MSN
Partners: Inktomi, Overture, Looksmart
Submission Site: http://search.msn.com
Time Delay: 2 months

Overture
Partners: Inktomi
Submission Site: http://www.overture.com

Inktomi
Partners: Hotbot, About.com, MSN, Espotting.com, Looksmart, Soneraplaza, Go, Bluewin
Submission Site: http://www.inktomi.com

Lycos
Partners: Overture, Fast
Submission Site: http://insite.lycos.com/inclusion/searchenginesubmit.asp?co=undefined

Go
Partners: Google
Submission Site: http://www.go.com/

iWon
Partners: Google
Submission Site: http://www.iwon.com/
Time Delay: 2 months

Exactseek
Submission Site: http://www.exactseek.com/add.html

Aeiwi
Submission Site: http://www.aeiwi.com/

AllTheWeb
Submission Site: http://www.alltheweb.com/

AltaVista
Submission Site: http://www.altavista.com/
Submission Method: Manual

EuroSeek
Submission Site: http://www.euroseek.com/
Submission Method: Manual

National Directory
Submission Site: http://www.NationalDirectory.com/
Submission Method: Manual

SearchHippo
Submission Site: http://www.searchhippo.com/
Submission Method: Manual

SearchIt
Submission Site: http://searchIt.com/

What-U-Seek
Submission Site: http://www.whatuseek.com/
Submission Method: Manual

Splat Search
Submission Site: http://www.splatsearch.com/submit.html
Submission Method: Manual

Meta-search Directories

These are “search engines” that rarely send out robots or spiders to search individual web pages. They search other search engine databases. A meta-search engine uses the information gathered by other search engines, permitting the user to search more than one search engine’s database at a time. Some meta-search sites permit site submissions, usually with a fee.

Mamma.com
http://www.mamma.com
Partners: LookSmart, Askjeeves, Copernic and Internet.com and others
Submission Site: http://www.mamma.com/info/submit/submit.html
Submission Method: Submission Fee and Annual “maintenance fee” through WhatUseek

FindWhat.com
http://www.findwhat.com
Partners: Lycos, Hotbot, CNET’s Search.com, Excite, WebCrawler, NBCi, MetaCrawler, Dogpile, Go2Net
Submission Method: Paid Submission Fee (advertiser) only

Smaller Search Engines and Indexes

123 World
http://www.123world.com/
Submission Site: http://www.123world.com/url-submit/addurl.html
Submission Style: Manual

1st Global Directory (requires reciprocal link)
http://www.123link.com/
Submission Style: Manual

411Locate
http://www.411locate.com/

A Top Quality Site
http://atopqualitysite.com/
Submission Site: http://atopqualitysite.com/addurl.htm

About.com (formerly, The Mining Company)
http://www.about.com/
Submission Style: Manual

Enhance (formerly Ah-Ha)
http://www.enhance.com/

AllBusiness
http://www.allbusiness.com/
Submission Style: Manual

Allestra
http://www.allestra.com/
Submission Style: Manual

Best of the Net
http://bestofthenet.tv/

Bet a Buck
http://www.betabuck.com/
Submission Site: http://betabuck.com/banner.htm

BigWhat
http://www.bigwhat.com/

Brain Fox
http://www.brainfox.com/
Submission Style: Manual
Note: Pay per click only

CanLinks
http://www.canlinks.net/
Submission Site: http://www.canlinks.net/addalink/
Submission Style: Manual
Note: Canadian Focused, choose from 6 categories

Category Web
http://www.categoryweb.com/

Cheats.com
http://www.cheats.com/

Claymont
http://www.claymont.com/home/
Submission Site: http://www.claymont.com/myaccount/submitsite.asp?img=y

Click for Choice
http://www.click4choice.com/

CMN.com
http://www.web-cmn.com/
Submission Site: http://www.web-cmn.com/NotFound.asp?keyword=getlisted

Cyber Directory
http://www.cdnet.com/cd/
Submission Site: http://www.cdnet.com/cgi-bin/hyperseek/add_url_list.cgi

Cyber Web Search
http://www.cyberwebsearch.com/

Dewa
http://www.dewa.com/
Submission Site: http://www.dewa.com/submit/

Ditto
http://www.ditto.com/
Submission Style: Manual

Dygo
http://www.dygo.com/
Submission Site: http://www.dygo.com/signup.php

Enhance (formerly Ah-Ha)
http://www.enhance.com/

EZSearches
http://www.ezsearches.com/

FetchDog
http://www.fetchdog.com/
Submission Site: http://www.fetchdog.com/search/no_cat.html

Geekin
http://www.geekin.com/main.htm

Get Favorites
http://www.getusfavorites.com/
Submission Site: http://www.getfavourites.net/tell_us_about_your_US_site.htm

Gigablast
http://www.gigablast.com/
Submission Site: http://www.gigablast.com/addurl

Gimpsy
http://www.gimpsy.com/
Submission Site: http://www.gimpsy.com/gimpsy/searcher/suggest.php

GotoGeo
http://www.gotogeo.com/
Submission Style: Manual

Group Web
http://www.groupweb.com/index.html
Submission Site: http://www.groupweb.com/your/adinfo.htm

GTE Yellow Pages
http://yellowpages.superpages.com/
Submission Style: Manual

Guide Beam
http://www.guidebeam.com/

Hot Sheet
http://www.hotsheet.com/

Hound Dog
http://www.hounddog.com/

iLOR
http://www.ilor.com/

Insider.com
http://www.insider.com/

Jayde
http://www.jayde.com/
Submission Site: http://search.jayde.com/cgi-bin/submit.cgi

Jayde
http://www.jayde.com/
Submission Style: Manual

kazazz
http://www.kazazz.com/
Submission Site: http://www.kazazz.com/listing.html

Kool Pages
http://koolpages.com/search/

Link Master
http://www.linkmaster.com
Submission Site: http://www.linkmaster.com/add.php
Submission Style: Manual
Note: Free, must post link to site

LinkoPedia
http://www.linkopedia.com
Submission Site: http://www.linkopedia.com/submission/index.html

MSN Search Index
http://search.msn.com/
Submission Style: Manual

My Search7
http://www.mysearch7.com/
Submission Site: Submit

OneMission
http://www.onemission.com/
Submission Style: Manual

Open Directory Project
http://dmoz.org/
Submission Style: Manual

OpenHere
http://www.openhere.com
Submission Site: http://www.openhere.com/scripts/addurl.dll?/addurl

OpenHere
http://www.openhere.com/
Submission Style: Manual

Qango
http://www.qango.com/
Submission Style: Manual

QuestFinder
http://www.questfinder.com/
Submission Site: http://www.questfinder.com/search/s-ctm.cgi?s-addurl.ctm

QuestFinder
http://www.questfinder.com/

Rex
http://rex.skyline.net/
Submission Site: http://rex.skyline.net/add/

Scrub the Web
http://www.scrubtheweb.com/
Submission Site: http://www.scrubtheweb.com/addurl.html

Search Blazer
http://searchblazer.com/
Submission Site: http://searchblazer.com/cgi-bin/ppc/signup.cgi

Search King
http://www.searchking.com/
Submission Site: http://www.searchking.com/add_new.htm

SearchGate
http://www.searchgate.co.uk
Submission Site: http://www.searchgate.co.uk/cgi-bin/search/add_url.cgi?Category=

SearchHippo
http://www.searchhippo.com
Submission Site: http://www.searchhippo.com/addlink.php

SearchKing
http://www.searchking.com/
Submission Style: Manual

SearchTheWeb
http://searchtheweb.com/
Submission Style: Manual

ShopMyState
http://www.shopmystate.com/
Submission Style: Manual

SightQuest
http://www.sightquest.com
Submission Site: http://www.sightquest.com/how-to-submit.htm

Splat Search
http://www.splatsearch.com/
Submission Site: http://www.splatsearch.com/submit.html

Starting Point
http://www.stpt.com/
Submission Site: http://www.stpt.com/?L=submit_form

SurfGopher
http://www.surfgopher.com/

SurfSafely
http://www.surfsafely.com/
Submission Style: Manual

Top 50
http://www.top50.to
Submission Site: http://www.top50.to/register.php

Turbo 10
http://turbo10.com
Submission Site: http://turbo10.com/addyoursite.html

TurnPike
http://www.turnpike.net/directory.phtml
Submission Site: http://www.turnpike.net/directory.phtml?addit

Walhello
http://www.walhello.com/

Web Search
http://www.web-search.biz/
Submission Site: http://www.web-search.biz/add.html

Web Taxi
http://www.webtaxi.com
Submission Site: http://www.webtaxi.com/taxi/urlform.htm

Webbie World
http://www.webbieworld.com/ww
Submission Site: http://www.webbieworld.com/ww/webnom.asp

Whoisman
http://www.whoisman.net/
Submission Site: http://www.whoisman.net/submithow.htm
Submission Style: Manual
Note: $5 one time fee for listing, Family oriented search engine, submit by category

WiseNut
http://www.wisenut.com
Submission Site: http://www.wisenut.com/submit.html

WotBot
http://www.wotbot.com/

Zappo
http://www.zappo.com/

Zeal
http://www.zeal.com/
Submission Style: Manual
Note: Must register in advance

ZenSearch
http://www.zensearch.com/
Submission Site: http://www.zensearch.com/submit.shtml

Zenzibar
http://www.zenzibar.com/

ZippyFinder
http://www.zippyfinder.com/
Submission Style: Manual

To help you with your web page submissions, we’ve included this listing of the most popular search engines and directories, as well as lists for search engines and directories, specialty search engines and directories, Website award submission sites, and we even have a Microsoft Excel spreadsheet which combines all these lists into one easy-to-use layout form for downloading.

For more information on how to prepare your Website and web pages for submission to search engines and directories, take time to read our article series on web page validation and preparation for search engine submissions. We also have listed extensive information in our article series on web page design to help you create the best possible “search engine friendly” and user-friendly Website.

Search Engine Directories and Indexes

In general, website lists like directories and indexes require manual submission for inclusion, and many require an inclusion fee. We’ve tried to list the ones that are free or inexpensive here. Like specialty search engines and directories, these are usually very specific in the website information they highlight, so be sure and read the fine print and check the requirements and criteria for inclusion before submission.

These directories often come and go frequently, so if you find the link to the directory is bad, please let us know so we may keep this page updated. Thanks.

Directories

To help you with your web page submissions, we’ve included this listing of special directories, as well as lists for the top search engines, specialty search engines and directories, Website award submission sites, and we even have a Microsoft Excel spreadsheet which combines all these lists into one easy-to-use layout form for downloading.

For more information on how to prepare your Website and web pages for submission to search engines and directories, take time to read our article series on web page validation and preparation for search engine submissions. We also have listed extensive information in our article series on web page design to help you create the best possible “search engine friendly” and user-friendly website.

Outlook and Outlook Express Tips and Tricks

We’ve provided extensive information about how to stop spam, popups, and email hoaxes, and how to use Internet Explorer for browsing the Internet, but what about the process of sending and receiving email? We haven’t forgotten, after all, traveling as much as we do, we are completely reliant on the Internet to stay in touch with friends, family, and our business contacts.


NOTICE FROM MICROSOFT as of February 23, 2005:
“Recently, Hotmail(r) announced that in order to improve customer experience and reduce spam and junk e-mail abuse on MSN(r) services, Hotmail will no longer allow new e-mail accounts to be accessed via Microsoft(r) Office Outlook(r) and Outlook Express. We are pleased to inform you that because you are an existing and valued customer, at this time your current Hotmail and MSN account(s) are exempt from this restriction and you will be able to continue enjoying access to those accounts from Outlook or Outlook Express. However, any new Hotmail or MSN accounts you create will not be accessible via Outlook or Outlook Express.


Outlook and Outlook Express are Microsoft products which can be found on most Windows computers. Outlook Express comes built-in with Windows and Outlook comes with Microsoft Office. Microsoft seems to love playing with similar names just to confuse people like Internet Explorer and Windows Explorer, and they’ve done the same here with Outlook and Outlook Express. These are two different programs which look similar on the surface, but are completely different inside. Let’s look at the differences and similarities.

Outlook Express handles email and addresses. Not much else. It will allow you to access newsgroups and do other email communications. It allows you do handle multiple email accounts from a variety of sources including HTTP/HTML web page accounts and POP3 accounts. As a straight email program, it is fairly powerful, allowing the creation of folders on your computer to store email in ways to keep certain emails together and help you keep track of your email in general. It does feature an address book, but it is fairly limited in what information it contains, not including much more than the basics.

ALERT AND WARNING!!! If you have installed the Windows XP Service Pack 2, you will no longer be able to access any “new” free Hotmail accounts via Outlook Express or Outlook. Microsoft requires upgrading to a paid account to use Outlook Express or Outlook with MSN email services.

Outlook is a serious contact management and time management program. It features calendars, sophisticated address book features, to do task lists, planning and scheduling via email, and very powerful corporate related features. You can link a specific event to a document, task and/or email easily. You can write emails now to be sent out on a schedule later. Outlook is for the serious business user, allowing you to categorize incoming emails and read emails to help you keep track of your business life. But it has some limits. Currently, it will only allow one HTML email account. If you have more than one Hotmail, Yahoo, or other HTML web page email account, only one will be able to be easily incorporated into Outlook. There are ways to get around this, and I’m always hunting for better ways, but they can be complicated to set up.

If you are a power user, then stick with Outlook. If you just do email and have web page email accounts (HTML), then stick with Outlook Express.

Tips and Tricks for Outlook and Outlook Express

Tips for Hotmail Users
Microsoft’s Hotmail is a popular free or inexpensive email account service. Simple and easy to use, they recently updated their layout to make it even faster. Here are some tips you may need to know if you are a Hotmail user:

  • Basic Hotmail accounts are limited to 2 megabytes (MB) storage space. Exceed the 2 MB limit and messages are returned to the sender.
  • Exceed the 2 MB limit Hotmail may delete messages to reduce the size of the account. If messages are deleted, they are gone for good.
  • You can increase your storage size for a fee, beginning at 10 MB for $19.95 USD a year. Exceed the limit and the same “full” policies apply.
  • Hotmail limits outgoing email to 100 messages per day.
  • Hotmail limits sending a single email to no more than 50 e-mail addresses at once in the To, Cc, and Bcc lines.
  • To write more than one email address on a single line, use a semi-colon (;) between each email recipient’s name.
  • Outgoing messages limited to 1 MB each, including graphics, content, and attachments, though you can increase this to 20 MB each if you have a paid subscription.
  • To remove messages from Hotmail and still save them, use Outlook Express and click and drag the messages to your Personal Folders on your computer.
  • To read email offline in Outlook or Outlook Express, select, click and drag the messages to your Personal Folders on your computer.
  • Set options to save “sent messages” to keep a record of what you send out. Sent Messages are deleted if they are more than 30 days old, so keep an eye on them as they accumulate in size.
  • The Junk E-Mail folder messages are automatically deleted after seven days.
  • To maintain your Hotmail account, you must sign in at least once every 30 days, or within the first 10 days after signing up.
  • If your account becomes inactive, all messages, folders, and contacts are deleted and irretrievable. The account name is still reserved for 90 days, at which time it is permanently deleted.
  • Hotmail uses McAfee VirusScan to automatically scan all attached files coming into and out of your email account. If a file contains a virus, it cannot be attached to a message.
  • Hotmail allows a Block Sender List and Safe List which can contain a maximum of 500 entries each.
  • Microsoft Outlook limits you to only one Hotmail account for full-access. To use more than one Hotmail account, you must set up the account to be viewed as a web page (Search Microsoft’s Knowledge files for more information).
Avoiding Spam? Viruses? Don’t Preview
As soon as your email program shows you the content of the email in the preview pane, you are susceptible to its contents. View your email subject titles, sender, and other information (called email headers) before downloading or viewing the email content. To eliminate unsolicited or suspicious email without reading it, turn off the preview pane. Select the unwanted email and hit the DELETE key.

In Outlook 2003:

  • From the menu choose TOOLS, OPTIONS
  • Click on the SECURITY tab
  • Select Change Automatic Download Settings
  • Uncheck the boxes for downloading photographs or other content – this turns it off.

In Outlook XP:

  • From the menu choose TOOLS, OPTIONS
  • Click on the OTHER tab
  • Choose PREVIEW PANE and check the box marked SINGLE KEY READING WITH SPACEBAR
  • To view an email in the Preview Pane, highlight the email and press the spacebar

In Outlook Express:

  • From the menu choose TOOLS, OPTIONS
  • Click on the READ tab
  • Outlook Express Preview Pane ControlsUncheck the box next to AUTOMATICALLY DOWNLOAD MESSAGE WHEN VIEWING IN THE PREVIEW PANE (press spacebar to download the message)
  • Click on the SECURITY tab
  • Check the box that says WARN ME WHEN OTHER APPLICATIONS TRY TO SEND EMAIL AS ME
  • Check the box that says DO NOT ALLOW ATTACHMENTS TO BE SAVED OR OPEN THAT COULD POTENTIALLY BE A VIRUS
  • Click APPLY and OKAY
Don’t Send Email Immediately
When you aren’t monitoring what email is going out, you may miss a chance to catch a potential virus or worm that is sending email out from your address book. Instead of sending email out as soon as you hit the SEND button, it will sit in your Outbox until you are ready to send it all. To send email, click the SEND/RECEIVE button or the small arrow next to it and choose SEND ONLY. By checking your outbox before sending email, you also have a chance to change your mind about what you are sending.

In Outlook, change the automatic send feature off by:

  • From the menu choose TOOLS, OPTIONS
  • Click on the MAIL SETUP tab
  • Uncheck (make blank) the box next to SEND EMAIL IMMEDIATELY

In Outlook Express:

  • Outlook Express Do Not Send and Receve Email at Startup screen From the menu choose TOOLS, OPTIONS
  • Click on the GENERAL tab
  • Uncheck the box next to SEND AND RECIEVE EMAIL AT STARTUP
  • Click on the SEND tab
  • Uncheck the box next to SEND EMAIL IMMEDIATELY
  • Click OKAY
Don’t Include the Original Message
It is a default of the email programs to include the original message in the reply. This is a horrible thing. If you are discusses serious business or legal matters, then what was said between each party should be preserved. Adding the original message bloats the reply email, making it larger. With so many people using small storage accounts for their email, you not only save them space by not including the original message, but it moves through the Internet faster because it is smaller. For jokes, basic conversations and simple replies, stop this nasty wasteful habit.

For Outlook:

  • From the menu choose TOOLS, OPTIONS
  • Click on the PREFERENCES tab
  • Under “On Replies and Forwards” at REPLIES, change the selection to DO NOT INCLUDE ORIGINAL MESSAGE
  • Outlook Express do not include message in reply screenClick OKAY

In Outlook Express:

  • From the menu choose TOOLS, OPTIONS
  • Click on the SEND tab
  • Uncheck the box next to INCLUDE MESSAGE IN REPLY
  • Click APPLY and OKAY
But I want to see what they sent me!
Blocking your previewing Outlook Express View Message Source screencapabilities doesn’t mean you can’t get some information about the email before you delete it while still protecting your computer. To view the text of a message, including the names of the sender and any encoded content, you have some choices:

For an attachment to a message in Outlook:

  • Select the email header and RIGHT CLICK
  • Choose VIEW ATTACHMENTS

In Outlook Express:

  • Do not open the email – Select the email header (subject title, sender) and RIGHT CLICK
  • Choose PROPERTIES
  • Click DETAILS then MESSAGE SOURCE

If you don’t like what you see, close the Properties window and delete the email.

A Word About Email
Email is a fun and efficient way of communicating, and it is so fun and easy, it is easily abused. Be a good emailing friend and co-worker by stopping all the forwarding on of jokes, funnies, and informative and inspirational emails. Stop it. Well, at least stop using every address in your email address book like a giant photocopier. Send non-essential emails only to someone you personally know will really appreciate it. Don’t send it because you think its interesting or funny and assume they will. Use your email power wisely, thoughtfully and carefully, considering the person you are writing to as if you were actually sitting down and writing a letter with pen and paper.

For those on the receiving end of jokes, funnies, informative and inspirational emails, or oversized attachments and great time wasters, stand up for your rights and stop the junk! Tell your friends, relatives and co-workers that enough is enough. You may use our standard reply for refusing jokes and junk:

Thank you for taking the time to think of us when you forwarded on your last email. As [choose one: amusing, interesting, fascinating, stimulating, inspiring] as your last email was, I’d like to ask you a favor. If you have a particular joke or informative article you would like to send us, could you take a moment to make sure it is something we really must see and that it would be important to our life? We sincerely think about the recipient of our emails when we send them, and we’d appreciate the same thoughtfulness. We love hearing from you, but we’d love to hear about your life and activities, how you are really doing and being in your life, than just hearing an anonymous joke or two. And thank you for helping us cut down on our time at the computer.

Filtering Out Spam
This technique involves using the built-in filtering techniques for Outlook and Outlook Express. It isn’t a perfect science but it may help you filter out and potentially slow down your spam harassment.

In Outlook

  • Choose TOOLS, RULES WIZARD
  • Click NEW on the right side of the box
  • Choose CONDITIONS to select filter messages from certain people (using email addresses), or containing certain words
  • Choose ACTION to occur if the email matches your conditions:
    • DELETE the message
    • MOVE to selected folder – Note: Choose MOVE if you want to keep the filtered messages to make sure you don’t delete an important message
  • RULE – In the bottom box you should see your new RULE for filtering. Click on the underlined blue word to enter the filter address you wish to block)
  • If there are exceptions to the rule, enter it in the EXCEPTIONS window
  • When asked to apply the filter to the messages already in your mailbox, you may choose yes or no
  • Name the rule
  • Click OK
  • Repeat the process for each new rule or filter options

In Outlook Express:

  • Choose INBOX, TOOLS, MESSAGE RULES, MAIL
  • Click NEW on the right side of the box
  • Choose CONDITIONS to select filter messages from certain people (using email addresses), or containing certain words
  • Choose ACTION to occur if the email matches your conditions:
    • DELETE the message
    • MOVE to selected folder – Note: Choose MOVE if you want to keep the filtered messages to make sure you don’t delete an important message
  • RULE – In the bottom box you should see your new RULE for filtering. Click on the underlined blue word to enter the filter address you wish to block)
  • Name the rule
  • Click OK.
  • Repeat the process for each new rule or filter options
Don’t CC Everyone – Blind Copy Them
If you have to forward or send information to more than one person, send Blind Carbon Copies (BCC). Click on the TO next the email address box in the email. This opens your address book window. To the right you will see three boxes into which you can insert addresses. TO and CC (carbon copy) will include each person’s email address in the outgoing email. BCC will not include the recipients’ email addresses in the outgoing email, protecting their privacy.
Remove Email Addresses from Forwarded Email
If you absolutely must forward any email, take a moment to remove all email addresses from the previous forwarding in the forwarded email. Select them and hit DELETE. By forwarding email with multiple private email addresses, you may be violating their privacy rights and exposing people to more spam and nasties. Who knows where a much forwarded joke ends up, carrying everyone’s email address with it. Delete before forwarding.

Revealed – Our Innovative Layout

Our Innovative Layout

Traditional Layout Path takes longer to get to the content.In the policy of open source code for web page design, layout and structure, we are sharing our CSS and HTML design and layout so others can learn and use what we have learned. We have a very innovative design used throughout our various web page looks and transitions and we share the code with you and provide helpful information and tips on web page design, CSS, HTML, XHMTL, and CSS experiments.

Each web page is made up of two main elements. The HTML page features the structure of the page and the CSS (style sheet) represents the presentation style of the HTML page. Because CSS now includes layout positioning, the HTML tags can be rearranged, to a point, in any manner. This frees the designer from having to code the page in a certain order. Books, agazines, and newspapers are commonly laid out in this structure:

1. Top – Header

2. Left – Sidebar

3. Right – Content

4. Bottom – Footer

Without CSS, that’s also the order you would code a web page.

We are proud of our layout structure because we defied tradition through the use of Cascading Style Sheets positioning and are able to have the visual layout in the traditional form while the actual HTML structure flows differently:

The path our code takes to get to the content faster than traditional layouts. 1. Top – Header

2. Right – Content

3. Left – Sidebar

4. Bottom – Footer

Why the change? And what is the big deal about this? The layout is the same!

Yes, the layout results are exactly the same. What changes is what happens under the hood. Consider the path gasoline takes to get to your engine. Typically, it follows the fastest path to keep the engine fueled. But what if tradition was to have the fuel line go around the rear of the car and back to the front before it got to the engine? The longer the fuel line, the harder the fuel pump as to work and the lower the fuel pressure. Innovation would come from shortening the distance. Laying out your web page’s HTML structure in the traditional form means your content is third, and possibly last, to load. The longer it takes for the most important element to appear on your page, the slower the access to the content.

Let’s look at the specific benefits of our innovative HTML structure layout:

Important Content Loads First
Most Internet users are familiar with this effect: you click on a page link and the page begins loading. You see the header, then the sidebar, and you wait, wait…ah, a title…wait, and then at last the content is visible. Code within an HTML page loads in the order it is received, first come first serve. The further down the list the content is, the later it is to load. Move the content higher in your page’s structure and the content loads faster. Visit one of our pages and if you have a slow enough bandwidth, you will see the header, then the content, and the last thing to load is the sidebar. We’ve reversed the process, getting the content to the user faster. The user can begin reading before the rest of the page finishes loading.
Faster Access to Content
In our old table layout design, the content first appeared on line 70 of the HTML page. In our new tableless design, the content begins on line 46. Search engines have to plow through each line of code to get to the content. The main home page of our table layout had 4,713 bytes of data to translate within those first 70 lines of code. In the tableless design, there are 3,749 bytes of data within 46 lines, an almost 20% reduction in size. Smaller file size, faster loading and faster access to content. And less code to plow through for the designer.
Search Engines Adore Us
As a search engine’s robot or spider plows through the code and content on your page, most barely move past the top 25-50% before moving on. Moving the content higher up on the page means faster access to worthwhile data. Remember, search engines can’t “see” your page, so they don’t care how pretty it is. They simply are looking for data they can use in their database. The more data search engines collect, and the faster they can collect it, the more they tend to like what you have to offer. Some search engines actually score points for fast access to your data through CSS and deduct them for designing with tables.
Accessibility is Easy
View of a webpage on a handheld computer Strip away our style sheet and the layout and content is still readable. When designing for accessibility, it is important to us that our web pages can be read by everyone, no matter their ability, disability, or hardware. Instead of being bored to tears waiting for the content to load, the user can get to the content while the sidebar sits at the bottom, waiting.

Streamlining our page’s structure through the use of style sheets instead of tables frees up our pages to be able to be viewed quickly and cleanly by anyone. The more who can read it, the more visitors we attract and keep.

Our Layout Structure

Layout Fun
To show you the powerful features of our layout, we’ve designed a variety of sample pages. Each pages contains the basic layout but features different styles and presentation effects to create the look. These are all examples of what is possible.

We’ve created a test example of our innovative layout for you to examine and use. The styles are built into the sheet rather than attached, so you can copy the source file and make your own changes. Looking at the test page, its layout, and the code underneath may help you better understand the following explanation. (To open the page in its own window to refer to while you read on, hold down the SHIFT key and click on the test page.}

By default, a web page is divided up into three main elements, the HTML, HEAD, and BODY. Inside the body, we add divisions called “containers”. These are elements which hold the data you see on the page.

Our page layout is a traditional header and footer with two columns in between. Our main divisions within the body are: container, header, content, sidebar, and footer..

Note the order these elements sppear on the page. They begin with the container which holds the entire page. Then comes the header at the top of the page, then the content, then the sidebar, followed by the footer. Most page layouts are container, header, sidebar, content, and footer. Our HTML structure depends upon the CSS codes to position the page layout. The content within the HTML allows the fastest path to the most valuable information, the content, leaving all the sidebar and footer information at the bottom. This means the search engines and those with slow or less compatible browsers will see the “stuff before the fluff”.

We have an example of what one of our pages would look like without the style sheet to show how the content would look if all the presentation styles (CSS) were gone and compare it to the same page with the style sheets. We also have examples of how one of our pages would look when put to the test and viewed by the wide variety of computer monitors, Internet browsers and various software and disability features, giving you a real world view and test of a web page’s design.

Let’s look at each element individually and then as a whole to help you understand how we did this. It took several months of trial and effort and we found very little help on the Internet, so we are proud of the results.

And The Layout Begins…

We have set the HMTL and BODY tags to have no margins. This gives us more freedom to set the margins of the divisions within the container tag.

html, body {
margin:0; padding:0; direction:ltr}

The container division ( #container) contains the whole page design within the BODY tag. All other tags go inside of this to contain them.

#container {
display:block; margin:0; margin-left:auto; margin-right:auto; padding:3px;}

From here, our page is divided into four sections: header, content, sidebar, footer. The header is the top head of the page that spans the width of the page and includes the title information for our Website. The width of the header is set to 100% of the width of the container. The height is set for 100 pixels, but this may be modified.

#header {
display:block; padding:0 3px; width:100%; height:100px}

Below this we have two columns: content and sidebar. The content column holds the content of the web page, including article information, photographs, and links. The sidebar column holds the navigation menu and other information related to the web page and Website.

#content {
display:block; padding:5px; margin-left:170px}

#sidebar {
display:block; position:absolute; top:105px; left:0; width:155px; height:100%; padding:0; margin:0m .5em 1em .5em;}

There are two positioning elements in CSS. Absolute positioning fixes a corner of a container at an unmoving point on your page. Relative positioning sets the position of the container in relationship to its parent container and the containers around it. It tends to move with the window’s width and resolution. We have worked hard to maintain as much flexibility in our layout as possible, so we rely on few absolute positioning techniques and mostly relative positioning.

To set these two columns we used absolute values for the top left corner of the sidebar as the starting point and gave it a fixed width. We’ve given a left margin absolute position to the content column, but the rest of the elements are assigned relative positioning so they move and stretch with the window size. Notice there is no top position value for the placement of the content. It is automatically pushed down by the header above it. The left margin position leaves a gutter space 170px wide for the sidebar to fit into with its fixed position and width.

Since the sidebar is being forced into position, we’ve used a top and left position:absolute to lock it into place. The top is set 105 pixels from the top of the page, sitting below the header which is 100px high. The left is set for 0 and the width is set for 155px to fill the empty space left by the content’s left absolute position of 170px. The gap in-between creates a gutter of 15 pixels of white space between the sidebar and the content. The height of the sidebar column is set to a relative length of 100% allowing it to stretch the height of the page to fill in the space. We’ve set margin and padding positions for our graphic needs, but these can be adjusted to meet your own needs for space around the content within the section. If the header’s height is changed, the top position of the sidebar must be changed as well.

Example of how a word that is too long pushes the width of the box to overlap the content.

If anything within the sidebar margin exceeds the fixed width, it pushes the sidebar over the content as shown.

Remember that anything within the narrow width of the sidebar that exceeds the absolute fixed width of 155px will push the sidebar over the top of the content section. Because the left margin of the content section is set at an absolute and not relative figure, the items in the sidebar will just layer over the top of the content material. This is a structural weakness that comes with using absolute values, so take care and watch for extra-long graphics, words, or non-spaced text like web page addresses which may push the right margin out over the content column.

At the bottom of the page is the footer. It is set to a width of 75% and floats to the right to permit the content in the sidebar to drop down below the footer if necessary. If the sidebar in your own design never passes below the footer, you can set the width to 100%. If the sidebar content exceeds the footer, it will overlap it. The magic of this ending code is the clear:both attribute which clears all columns, graphics, and content above it to the right and the left above the footer code. This forces the content within the footer to sit at the bottom of all the other DIV sections (columns) and content, except the sidebar. It keeps the footer close to the content and gives the article content a clean bottom. We go into the specifics of our footer design in our section on the fonts, text, headings, and links of our web page design.

#footer {
display:block; clear:both; float:right; width:75%; padding:10px; border-top:1px solid blue}

One Little HTML Bug Fix Makes It All Perfect

Before we get to the final set of code for our page’s layout, we have to fix a bug. Microsoft Internet Explorer, whether you like it or not, represents over 80% of all Internet browsing software around the world. Remember, you are designing your web page for an audience, and the majority of your audience uses Microsoft Internet Explorer. Internet Explorer also comes with a few bugs – problems – that need special attention in order for a page to look right when viewed. One of those little problems causes containers, lists, and links to jump around or appear and disappear. A lot of people have come up with ways to fix this, but none are as simple as the Holyhack.

I’ll leave it to the experts at Positioniseverything.net to discuss the “IE Three Pixel Text-Jog and Holyhack” better than I can. For us, the fix comes in two parts. The first one is to make sure and assign the display:relative to most division containers. The second part is to add to the style sheet the following rule:

/* Hides from IE-mac \*/
* html .holyhack {
height: 1%;}

/* End hide from IE-mac */

In the HTML of every page we have the following:

<body dir=”ltr”>
<div class=”holyhack”>
<div id=”container”>…

The Holyhack adds a height to everything overall, which helps Internet Explorer set everything in its place. It isn’t the “real” height of the container but Internet Explorer recognizes it and it works. That’s the main thing: It works.

All Together: Our CSS Layout

We’ve looked at the specific sections and now it is time to see the whole thing. We’ve included a few of our basic designs as placeholders for you to insert your own design elements. We’ve also done a lot of experimenting with different CSS designs and you can find your own inspiration and ideas there.

Either place the code in a <style> tag block in the header of your web page or in an attached style sheet. The HTML is laid out below.

CSS Style Sheet Codes

html, body {
margin:0; padding:0; direction:ltr}

body {
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:1em; color:black; background:white}

/* Hides hack from IE-mac \*/
* html .holyhack {
height: 1%;}

/* End hack hide from IE-mac */

#container {
display:block; margin:0; margin-left: auto; margin-right: auto; padding:3px;}

#header {
display:block; padding:0 3px; width:100%; height:100px}

#content {
display:block; padding:5px; margin-left:170px}

#sidebar {
display:block; position:absolute; top:105px; left:0; width:155px; height:100%; padding:0; margin:0em .5em 1em .5em;}

#footer {
display:block; clear:both; float:right; width:75%; padding:10px; color:#6633FF; border-top:1px solid blue}

HTML CODE

Now that you have the layout set in the style sheet it is time to add the foundation for your web page. The following is our basic HTML structure. Note: You will need to change the document type to reflect your own needs.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html dir=”ltr” lang=”en-US”>
<head>
<title>Page Title</title> Javascripts Here
</head>
<body dir=”ltr”>
<div class=”holyhack”>
<div id=”container”>

<div id=”header”>Header Here</div>
<div id=”content”>Content Here</div>
<div id=”sidebar”>Sidebar Here</div>

<div id=”footer”>Footer Content and Links Here</div> /* footer ends */

</div> /* container ends */
</div> /* holyhack ends */
</body>
</html>

Layout Links and Resources

Revealed – Our HTML and CSS Codes

NOTE: As with all web pages, they are often in a state of evolution. Within a couple of months of producing these pages giving the specifications of our Website design, we made a few changes. Most of these were cosmetic, changing a background color or font. We’ll list these changes soon. In the interim, there is still a lot to learn from our web page styles no matter what they look like.

In 1999 it was official. Web pages were to be designed using an innovative combination of HTML pages to hold the structure of the web page and an attached Cascading Style Sheet (CSS) file to hold the presentation elements. For consistency, one style sheet could be linked to hundreds of HTML pages. Until this point, the layout design relied upon by most designers was the table, a grid layout resembling graph paper. While it did the job, it was clumsy, confining, code heavy, and easy to screw up. By going tableless with style sheets, designers entered a new realm of creativity.

In 2003, our site, Taking Your Camera on the Road, finally got on the CSS band wagon and we completely eliminated our tables layout. The results are incredible. Our pages are easy to update and maintain, we have greater control, and they load incredibly fast.

More specifically, the benefits of using style sheets are:

Faster Access to Content
The loading time for a web page is based upon several factors, most importantly on the size of the files coming into the user’s computer. When a visitor comes to a CSS supported site, the first page loads into their browser along with the style sheet. During the rest of their visit, only the html page loads as the style sheet is already in the memory, reducing the load capacity. This gives faster access to the content and speeds up the whole process.
Search Engines Get Content Faster
A search engine isn’t looking at your pretty code. It wants the data to fill its database and help people find your site. The more code it has to plow through to get to the content, the harder the search engine has to work. CSS reduces the code and allows the search engine to get to the meat of your page. Some search engines also give points for pages which are web standard compliant with style sheets, which helps you move up through the ranks.
Browsers Love It
The majority of Internet browsing software recognizes Cascading Style Sheets. Instead of designing a page to accommodate all the different types of browsers and computers (Netscape, Microsoft Internet Explorer, Opera, Macintosh, etc), compliance with web standards creates a uniform set of code recognized by all the programmers. Bold will be bold no matter which program you are using. Any code not recognized by a browser is ignored without crashing or scrambling the page. The designers save time, and browsers can interpret the page with less stress and faster speeds.
Designers Love It: Easy Update – Easy Maintenance
Using CSS, instead of plowing through a couple hundred lines of code, I can get right to the content for easy updating and changes. Separating the design from the form means working with less code, but also more precise code. With less presentation code within the HTML page, there is less chance of slipping and deleting a little letter here or there and ending up with a scrambled web page. The less fuss you have to spend to create your pages, the easier they are to update and maintain.
Greater Control Over Design
Instead of tediously changing all the code on every page, a major task as our site totals over 500 pages and growing, we can change the design of our pages from one file. Using style sheets also gives the designer more control over layout, positioning, fonts, colors, backgrounds, and other effects than ever before.
Accessibility: Looks Better to Non-Graphic Users
Almost a quarter of all Internet users have special software that allows them to use a page without the pretty layout or displayed to control the background, foreground, and text size, overriding the designer’s elements. This includes the blind, visually impaired, physically impaired, and no-nonsense users. Add to that number of users viewing web pages on handheld computers and cell phones, miniaturizing and scrambling your lovely layout. The simpler your page layout is when stripped of the presentation code, absent the style sheet, the easier they can access your page.
The Real Benefit They Don’t Tell You About
After a year with a web standard compliant Website, there is a benefit that no one seems to mention. For the HTML and CSS writer and designer, this benefit is the BEST part of having a tableless web page. When you make a goof in a table layout, things go screwy and you have to plow through tons of code to find the goof. With a CSS based design, every little glitch is almost immediately obvious. Miss an end tag for a division, everything is a mess from that point down. Miss an anchor tag A span end tag goes missing and all goes to hell in this visual representation of one of our test pages. Graphic by Lorelle VanFossen and everything on your page becomes a link from that point on. The smallest glitch in the code is visible right away, giving you the clues to where the mistake began, making the job of HTML and CSS detective and problem solver fast and easy. In the graphic to the left, one span end tag was missing and everything below the “made easy” went screwy. Instantly, I knew where to start hunting. The more compliant your page is, honestly, the easier it is to maintain and spot those slips of the finger.

We’ve listed some links and resources below to help you better understand how HTML and CSS works. Our goal on this page is not to teach you HTML or CSS but to show off what we’ve come up with. The Web is a wonderful place to learn and exchange information. We borrowed many of our ideas from other people, and then begged others to help us create and fix what we wanted to design when we couldn’t find similar code. Currently, HTML and CSS designed code is not protected by copyright or trademark. The results are, but the underlying code is open source. When you find something you like, copy the code, but add in your own content, and see how it works for you. This means you can’t copy graphics, but you can copy colors, layout, and text styles. Then make them your own because no one likes a plagiarizer.

CSS For Beginners

CSS and Web Page Design Discussion Groups

CSS – The Things You Need To Know

While there is a lot of information about code styles and design layouts out on the web and throughout our CSS experiments and examples, some of the smallest details can be difficult to find. One of the little bits I needed to know was about how to layout a style sheet. Where do the spaces go? Does there need to be spaces between the codes? Does each rule need to be on its own line? And how to structure the rules, selectors, and declarations? When do I use colons and when do I use semi-colons? When do I use quote marks in CSS? Is there a reason and rhyme to naming DIVs and classes?

While HTML isn’t very forgiving when it comes to a slip of the finger or a space in a tag, CSS is a bit more forgiving. Here are a few things we learned along the way, especially while working on our CSS experiments.

Rules and Lines

There are several ways of laying out the style sheet rules and declarations. CSS ignores spaces between lines and how the rules are laid out as long as they stay within the contraints (brackets). Here are some layout forms that are all acceptable, though the ones with more spaces between lines and rules enlarge the file size, something you want to avoid.

This style keeps the whole rule on one line:

.title {
font-weight:bold; font-size:90%; text-align:center}

.heading {
color:navy; font-weight:bold; font-size:110%; padding: 0 0 5px 8px}

This style sets each declaration in the declaration block on one line:

.title {
font-weight:bold;
font-size:90%;
text-align:center}

.heading {
color:navy;
font-weight:bold;
font-size:110%;
padding: 0 0 5px 8px}

This style sets each declaration on one line and indents them for a cleaner and easier to read look:

.title {
font-weight:bold;
font-size:90%;
text-align:center}

.heading {
color:navy;
font-weight:bold;
font-size:110%;
padding: 0 0 5px 8px}

This style double spaces each declaration (or you can add space between each rule for easy reading of the layout):

.title {
font-weight:bold;

font-size:90%;

text-align:center}

.heading {
color:navy;

font-weight:bold;

font-size:110%;

padding: 0 0 5px 8px}

Remember, the more tabs and empty lines you add to your CSS file, the bigger it becomes. A fast loading web page begins with small file sizes on everything, including the style sheet, HTML, and the graphics and images.

Spaces in CSS

Spaces are another thing that can save space in your CSS sheet. That’s right. You can save space by removing space. While spaces are needed ocassionally, double spacing between lines and spaces between declarations can go. For example:

h4 {
margin: 0; font-weight: bold; font-size: 105%; font-style: italic; color: blue; padding-top: 1.5em}

Would become like this with all the spaces removed, freeing up 11 bytes – it all adds up:

h4 {
margin:0;font-weight:bold;font-size:105%;font-style:italic;color:blue;padding-top:1.5em}

Using the shorthand method discussed in the next section on Combining Measurements, you can further condense the font declaration block down from 91 to 61 characters (bytes) like this. Notice the spaces kept between the font declarations. These spaces stay.

h4 {
margin:0;font:bold 105% italic;color:blue;padding-top:1.5em}

Quote Marks

In the early days of CSS, quote marks were okay around the values of the declarations. Today, quote marks are unnecessary and they consume a lot of file space. Text surrounded by quote marks is a “string” and has different properties. Here is an example with quotes – deemed unacceptable code today:

#content {
position: “relative”; display: “block”; width: “90%”; color: “blue”}

It should look like this to comply with web standards today:

#content {
position: relative; display: block; width: 90%; color: blue}

There are exceptions to the quote marks policy. When designating a phrase which includes a space (called a “string”), such as in the font-family name for Times Roman, the phrase must be surrounded with quote marks such as:

font-family: Arial, Helvetica, “Times Roman”, sans-serif

Any references to URLs like a linked image within a style sheet used to require quote marks such as:

#header {
margin-left: 50px; background-image: url(“images/back.gif”) repeat; background: green}

Remember, HTML and CSS is fluid, changing and evolving. With the CSS-2 Revisions and the coming of CSS-3, quotes around URLs might not be required. No quotes on URLs are currently acceptable depending upon your document type. XHTML and XML are becoming stricter about the use of quotes.

#header {
margin-left: 50px; background-image: url(images/back.gif) repeat; background: green}

In HTML tags, quote marks are required for XHTML compliance to be around class and ID names.

<h2 id=”level1″>Title for <span class=”level1a”>Level One</span></h2>

Pounds, Periods, Commas, Colons, and Semi Colons

Knowing when to use the pound (crosshatch), comma, colon, and semi-colon when layout out CSS rules can get confusing at first. Here are some simple definitions for when to use which:

Pound Sign(#)
The # is used to define a division within the style sheet. Everything within that division will be modified by the declarations within the division. It is set as div#name or simply #name.

#content {
position: relative; display: block; width: 90%}

or
div#name {
position: relative; display: block; width: 90%}
Periods (.)
A period before a word designates that word as a class. Tags featuring that class are modified by the class declarations. These can also be used in combination with tags and divisions, thereby modifiying only the elements within those tags or divisions and not elsewhere.

.blue {
color: blue}

#intro.blue {
color: blue}

p .blue {
color: blue}

.blue p {
color: blue}

Commas (,)
Commas are used to distinguish different selectors or declaration values within a rule. For instance, when declaring a font-family, several fonts can be listed such as font-family: Arial, Helvetica, "Times Roman", sans-serif. When combining declarations to shrink the file size of the style sheet, multiple selectors which use the same common declaration can be grouped, separated by commons, in a line before the declaration.

p , dl , dd , li {
font-weight:normal}

#intro , .section1 , #header.p1 {
color:green}

Colons (:)
Colons are used to separate the property from its value such as:

p {
font-weight :normal}

p {
font-family : Arial, Helvetica, “Times Roman”, sans-serif}

Semi-Colons (;)
Semi-colons are used to separate declarations within the declaration block. The last code in a declaration block does not have to have a semi-colon before the end-bracket. An example is:

#content {
position: relative ; display: block ; width : 90%; color : blue}

Comments in HTML and CSS

Comments are non-publishing content in a style sheet or HTML that permit the designer to insert text to set layout clues and to provide information to help the desiger or viewer of the code. For example, comments can be used to designate that the following space is where a new article should be pasted into an HTML template web page, the following comment would be made:

<!–ENTER Article Here –>

and followed by:

<!–END Article Here –>

A comment in a style sheet to help the designer group elements together or give information about a style would look like:

/* Sidebar Elements Here */

Comments can be added after a rule and within a rule such as:

h1 {
color: red;
font-size: 120% }
/* About 18 pt equivalent */

.bluesmall {
color: blue; /* Colors it all blue */
font-transform: uppercase; /* Forces uppercase */
}

A space after and before the — in the HTML comment, and space after the /* and before the */ in the CSS comment, are required for recognition of the material inside the comment to be separate from the content. Remember comments add to the file size so when you are optimizing your HTML and CSS, keep comments to a minimum.

Links: CSS From the Source – The World Wide Web Consortium

Hierarchy in CSS

There is a lot of information at the W3.org about the hierarchy and inheritance of HTML and CSS, but here is a tip that should help you remember. The closer the tag, division, or class to the actual content you want to modify, the more likely that modifier will change the content. The general order is HMTL, CSS, tag, div, then class, but this is not strict. Just remember, the closer it is, the more influence.

<div id=”#chapter”>
<h1>Chapter One</h1>
<p>This would be a paragraph set by the paragraph design elements under the division.</p>
<p class=”para1″>This is paragraph one class style with an
<span class=”para1span”>example of a span with a
<b>bold</b> tag</span>
which modifies the span which modifies the paragraph.</p>
</div>

Simply put, in the above hierarchy example, the division ID called chapter included how the H1 tag would look and how the paragraphs would look. Enter class="para1" and the new class statement overwrites the paragraph look for paragraphs under the chapter division. Then a span comes in and changes the look of para1 and then a bold tag adds an accent of bold, modifying the span, and then slowly the modification elements close and the paragraph returns to its original intent.

This is just a glimpse into the hierarchy of CSS. The list of links below will help you understand better the parent/child relationship CSS and HTML have to each other as you design your layout.

CSS hierarchy and Inheritance – Links and Resources

Hierarchy in Website File Locations

There is a hierarchy within your Website directory, too. This one involves the way hyperlinks (links) work within your web pages, between your web pages, and between your Website folders or directories.

Hyperlinks (links) within a document consist of external links, internal links, and named anchors (jump within a page). There are two types of links: absolute and relative. An absolute link to an image or another page would be similar to a strict web page address:

<a title=”article on web page validaton” href=” http://www.cameraontheroad.com/ learn/web/validate.html“>validating your web page</a>

Clicking the link would take you, literally, out of the site and back into it, reloading the page rather than just looking for the page on your site.

The relative method uses a feature that permits the link to move within the frame of the site relative to the page.

<a title=”article on web page validaton” href=” ../validate.html“>validating your web page</a>

This would send the browser looking one folder up the site’s hierarchy to find the page. To send the browser looking two folders up the site’s hierarchy to find the page, it would look like this:

<a title=”article on web page validaton” href=” ../../validate.html“>validating your web page</a>

The following sends the browser looking down from the current page’s position within the site’s hierarchy to the learn folder and then down again to the web subfolder to find the appropriate page.

<a title=”article on web page validaton” href=” learn/web/validate.html“>validating your web page</a>

There are pros and cons to using either method. The main benefit of using the relative method is the use of less characters in the anchor reference. If file size is important to optimize your pages to their fastest loading, this is one way to cut out a few bytes.

Anchor names, links which jump within a page rather than leaving the page, can also be absolute or relative, though most are considered relative. An absolute anchor name would be:

<a title=”jump to section” href=” page.html#here“>jump to here</a> and the anchor would be <a name=”here”>here </a>.

The above link would reload the page and move to the anchor name. A relative anchor name link would be:

<a title=”jump to section” href=” #here“>jump to here</a> and the anchor would be <a name=”here”>here </a>.

This link would jump within the page without reloading it. Reloading a page, and all its attached files and graphics, takes time. Jumping within a page without reloading it is a very quick process for the user.

Remember division ID names also act as targets so the links to an ID name of “thisone” would look like this:

<div id=”thisone”>This is This One</div>

<a title=”information on this one” href=” http://www.here.com/pageone.html#thisone“>link to thisone</a>

<a title=”information on this one” href=” pageone.html#thisone“>link to thisone</a>

<a title=”information on this one” href=” #thisone“>link to thisone</a>

If at any time in its search it can’t find the page, it will return a “page not found” or Page Error 404, so take care when assigning links to pages and images to make sure they are actually where you think they are.

Link Hierarchy Within the Style Sheet

Our Website features over 500 articles within 14 folders and numerous subfolders. Our Learning Zone hosts 11 different subfolders related to our various educational subjects like basic nature photography, closeup nature photography, composition, equipment, and weather. Yet, we only use one main style sheet for the entire Website.

The links within the style sheet to the various graphic effects, such as backgrounds or embedded fonts, are called out from the style sheet and not the page in which you are viewing the content. When you view a web page, it loads the linked style sheet, and then the elements within the style sheet are loaded. Therefore, for the background image associated with our H3 header, I can use one URL reference and it will show up on every page, no matter how deep that page might be within the hierarchy of the site. Instead of providing a relative link from every page on the site to the reused graphic, the CSS style sheet does the work for me, such as:

#header {
display:block; background: url(“images/core/takelogo.jpg”) no-repeat left bottom fixed}

Our style sheet can be found in a folder called styles and the core images for our site are found in the images/core folder. Therefore, using relative anchors, the link to the background image tells the browser to go up one folder then down two subfolders to find the graphic.

Internal and External Hyperlinks (Links) – Links and Resources

CSS Style Sheet Blues: Clean House

After playing with your style sheet and filling it with wonderful design elements, and after you’ve been living with it for a month or so, having passed all the tests, it’s time to clean house.

Go through the CSS style sheet and really look closely at everything you have in there. Ah, that funky box with the neato colored background and borders. Ended up not using it, right? Toss it. Or the BIG font that reaches over 200% high. You really didn’t need that, did you? Throw that away. Look for the clunky CSS that you thought was a bright idea but never used it. Junk it.

Also take time to really streamline and optimize your style sheet. Strip it of excess spaces and lines. Group similar declarations together to save space. Look for redundancies, too. While you combined and grouped similar declarations together, did you leave any laying around in the original selectors? Look closely and see how many ways you can clean up your style sheet house so it is a thing of sleek beauty.

Valdilate and Check, Check, Check

As you are making changes, even little changes, validate your CSS and HTML codes frequently. Check them thoroughly. Even a year later, I’m still finding little bits of code I can clean up and improve, or code I simply left out somehow. It is a never ending process that is not locked in stone. Feel free to change and adjust your coding, but always check it thoroughly as you go so you can catch the little boo-boos and not be stuck searching through reams of code after two days of changes for the one little boo-boo you missed. Check as you go.

Understanding CSS Selectors and Attributes

Word Games – Understanding the CSS Jargon

Understanding how CSS and HTML work together is not easy. The idea that it takes two pieces to fit together to make a web page display is a challenge. We’ve broken down the concept into simple terms and definitions, as well as simple examples to help you understand how CSS influences HTML and how they work together, and how to start to create your own web page designs. We begin with terminology and then simple application, developing into an understanding that while tables no longer shape and form web pages, the containers created with HTML and CSS not only shape but provide a new form of control over the end result.

If you are considering exploring our CSS experiments, or doing any of your own web page design, then take time to understand how CSS selectors and attributes work.

At the core of cascading style sheets are rules. The simplest kind of rule looks like this:

H1 {
color: green }

Each rule consists of a selector and a declaration such as selector {
property: value}
. In the example above, H1 is the selector. It’s the HTML tag that the style is being attached to. The declaration defines what the style actually is, and it also consists of two parts: the property (in this case, color) and the value (green). The above rule tells the web browser that all text surrounded by <H1> and the closing tag </H1> should be displayed in green.

Graphic representation of a CSS rule, declaration block and declaration, graphic by Lorelle VanFossen

Any HTML tag can be used as a selector. Thus, you can attach style sheet information to any kind of element, from normal <P>; text to <TABLE>. They are attached to HTML tags and define divisions of style in the form of classes ( <p class="green">), divisions ( <div class="green"> or <div id="menu">), and spans ( <span class="green">). Check out the above tutorials and resources below for more details explanations and information and see our article on tips and tricks from our web page design, specifically our section on the differences and similarities of divisions and classes, and CSS fun, tips and tricks. If you are ready for the “big time” in CSS design, check out our extensive CSS design examples and experiments, putting CSS designs to the test.

CSS From the Source – The World Wide Web Consortium

The Differences and Similarities
Between DIV, CLASS and SPAN

While sometimes interchangeable, divisions and classes are different and they need to be used properly. Many amateur web page designers stick only to classes to modify the HTML, thinking this is easier. It actually makes things more complicated. Let’s see if we can clear up the similarities and differences between divisions and classes and figure out when and when not to use them.

Divisions, classes and spans are similar because they modify the content. All can influence tags. All are containers, influencing every tag within their container. The differences are more important and influence the design and layout of a web page.

A div represents a division in the structure of the web page called a generic block-level element, which means that it sits within its own line or block container. There are two kinds of div selectors. One is used just as a division, which sets up a block of content, and the other is a division that sets up a block of content modified by the design elements within an ID or class rule.

A plain div would look like this:

<div>This is content within a division. </div>

A div influenced by an ID, a unique, non-repeating name, would have the characteristics of the division selector as specified within the style sheet and identified with a hash or pound sign (#), such as:

#header {
position: relative; color:blue; background: white; font-size: 120%}
<div id=”header”>This is the header</div>

A div influenced by a class, a repeating non-unique name, would have the characteristics of the class selector, designated with a period before the name ( .red):

.red {
color:red; background:transparent}
<div class=”red”>This would be a division with red text.</div>

SPAN is also a container, but while div sits within its own line or section, a span is an inline container. This means that it influences the content within its container in relationship to the division or container it sits within. It can’t influence the parent container. Spans can be set by the declarations (design elements) of its div or class. We use span in our blue box to influence the text within the box elements in relationship to the container they are in. For example:

.red {
color:red; background:transparent}

span.blue {
color:blue; background:transparent}
<div class=”red”>This would be a division with a <span>blue text span</span> inline with the red text.</div>
This would be a division with a blue text span inline with the red text.

A class is more of a description code. It can be an inline container or set to be a block ( display:block) or modified in many different ways. It “describes” the presentation characteristics. It is a code that links to the presentation style selector within the style sheet and influences any HTML or division tag. Unlike an ID tag, a class can be used over and over again on the same page.

We’ve shown how the class works in the examples above, but let’s look at one more using all the elements we’ve discussed.

#section {
position: relative; color:blue; background: yellow; width:50%; border: 1px #000099 solid; font-size: 110%}

.red {
color:red; background:transparent}

.darkgreen {
color:#006600; background:transparent}
<div id=”section”>This is text within the division with blue type and a yellow background.
<p class=”darkgreen”>This is a paragraph within the division with dark green text and a span influenced by a class which turns <span class=”red”>this section of red text </span> before returning to blue.</p>
And more text which should be in blue.</div>
This is text within the division with blue type and a yellow background.

This is a paragraph within the division with dark green text and a span influenced by a class which turns this section of red text before returning to green.

And more text which should be in blue.

Classes modify content the same way as a div ID, but classes shouldn’t be associated with the overall layout structure. Their job is to change the smaller elements.

Classes, spans, and divisions can be used in combination. The containers used for pull-quotes and highlighting tips and resources within our articles are set within layers of divisions modified by classes. These containers are not unique to the page and are often repeated on a single page. Using classes allows these containers to be repeated. In the hierarchy of CSS, the span modifies the class which modifies the division, creating a child/parent relationship. The closer a modifier is to the content, the more control the modifier has to overwrite the parent characteristics.

<div class=”boxtip”>
<div class=”tiptitle”><span>Tip Box Title </span>
</div>
<div class=”tipbody”>Tip body content here…

These boxes are divisions within the page, but they are not unique to the page. I might have two or three tip boxes within a page, so the class rule allows me more than one division container.

Understanding the ID Even More

Each div has a unique name and characteristics set up in the style sheet, called an ID, and it can only be used once per page. Divisions usually represent the layout structure such as header, sidebar, container, footer, and content. The areas they represent tend to be large rather than small lines or elements.

Divisions representing the layout of the page help the designer when they make future modifications. Suppose you want to change the font in the sidebar sections on all of your pages from Arial to Times Roman. Having all of your sidebar content in the sidebar division, a simple change to the font-family selector would modify the sidebar on every page linked to that style sheet. Simple and easy.

But ID names are not limited to divisions such as div and a division is not limited to only div selectors. Any selector that acts works as a block container is a division. These include <h1>, <h2>, <p>, <table>, and <ul>. A div is a generic block element. An HTML tag is a division that is a specific block element. All of these can be assigned a unique ID name.

Take time to seriously peruse the many web page examples at CSS Zen Garden. If you look at the HTML on every page, it is exactly the same. Word for word, division by division. The only thing that changes is its style sheet, which they provide for examination on every page. In order to create this amazing feat, each element within the HTML is designated with an ID name, such as:

<div id=”head1″>
<h1 id=”header”>This is Header Under Head1 </h1>
<p id=”p1″>This is paragraph one and it says something. </p>
<p id=”p2″>This is paragraph two and it says something else. </p>
</div>
<div id=”head2″>
<h2 id=”header”>This is Header Under Head2 </h2>
<p id=”p1″>This is paragraph one under head2 and it says something else more. </p>
</div>

This way the designers, using the same HTML structure and content, can create such diverse and creative designs because each section is clearly identified. You can also see some of this at work in our other CSS experiments and pages on web design and layouts.

There is another powerful feature to the ID name. As it is unique, only one ID name per page, it can also represent a target point or anchor to link to. We discuss the hierarchy of various links later, but in a jump-with-a-page anchor, the traditional link looks like this:

<a href=”#here”>Jump to section </a>

Landing on the target anchor which looks like this:

<h3><a name=”here”>Heading Here</a></h3>

With an ID name in the jump or target points, the visitor can click on the same link as above but it will take them to the unique ID name target reference like this:

<h3 id=”here”>Heading Here</h3>

This is another method to help streamline the code and makes the process more efficient. Since division IDs are unique, and classes and spans aren’t, this is only possible with div IDs.

The unique ID element for a division has limits. You can’t give two IDs to one division. But you can give multiple classes to a tag or division to influence its change, as you can read about in the next section on Combining Classes.

Just remember to use divisions for structure and classes for presentation elements, and it will help simplify your design.

Names for Classes and Divisions

A division ( div) must be unique within a web page, though it can be used repeatedly throughout a Website, such as #content found on every page with a consistent look reflected in the style sheet. The names for the various divisions which create the basic layout for a page are usually recognizable names: container, header, sidebar, content, column1, column2, footer, etc. Sometimes these are abbreviated to cont1, head, side, col1, col2, foot, etc. Divisions within the content usually reflect the information within the division such as intro, ads, list, info, definitions, etc.

Classes are also reflective of what they do. For example, a class called “red” would probably turn the content in the tag modified to the color red. It really doesn’t matter what they are called as long as they are consistent and clear to the designer. There are no rules regarding name choices in CSS.

There are, however, rules about how the names should be formated. The names of divisions and classes can be a combination of letters or numbers, but they must start with a letter. Acceptable is <div id="w43564"> but <id="43564w"> is unacceptable. The words or phrases may have a hypen between them, such as white-text, but they cannot have spaces in between the words. The following are some elements that division and class names cannot have, usually because they are assigned elsewhere: &, \, /, @, *, {
, }
, [, ], +, =,
and %.

DIV, ID, CLASS, and SPAN – Links and Resources

CSS Shorthand: Combining Classes

You probably noticed a technique within these pages, especially in our CSS experiments, called “combining classes”. Generally, if you wanted to assign two class selectors to a tag, you might write:

<p class=”bold” class=”small”>This is bold and small</p>

When modifying a tag or element with more than one class, you can use them in combination. The above code should read:

<p class=”bold small”>This is bold and small</p>

If I want the paragraph to be bold, small, and green, it would look like this:

<p class=”bold small green”>This is bold and small and green</p>

CSS Shorthand: Combining Declarations

The speed of a web page loading is dependent upon many factors, most importantly the size of the file. Anything that can be done to make the file size smaller speeds up the process.

One technique in CSS is to condense the code, combining similar codes together. For example:

h1 {
margin:0; font-weight:bold; font-size:130%; color:blue; padding-left:5px; padding-top:10px}

h2 {
margin:0; font-weight:bold; font-size:120%; color:navy; padding-left:5px}

h4 {
margin:0; font-weight:bold; font-size:105%; font-style:italic; color:blue; padding-top:1.5em}

CSS has a feature which permits grouping selectors together and giving them a shared declaration. Selectors are grouped on one line with commas to separate them.

h1, h2, h4 {
font-weight:bold}

h1, h4 {
color:blue}

h1, h2 {
padding-left:5px}

h1, h2, h4 {
margin:0}

h1 {
font-size:130%;padding-top:10px}

h4 {
padding-top:1.5em;font-size:105%;font-style:italic}

h2 {
font-size:120%;color:navy}

CSS Shorthand: Combining Measurements –
Margins, Padding, Borders, and More

There are also shortcuts and ways of combining measurements in declarations that will shrink down a web page’s file size, and make it easier to write the code.

Measurements for margins and padding, follow the clock in clock-wide positions: top, right, bottom, left. So a measurement for a division or class could be:

.box {
margin-top: 1em; margin-right: 1.5em; margin-bottom: .5em; margin-left: 1.25em}

Consolidate all of that into this CSS shortcut and abbreviate it to:

.box {
margin: 1em 1.5em .5em 1.25em}

Much shorter and faster to work with. There are other modifications you can do when the magins values are repeated, such as the above with the same top and bottom margins of .5em and left and right margins of 1em would be:

.box {
margin: .5em 1em}

You can also streamline your border codes. Here is a border CSS code for a box:

.box {
border-top: 1px; border-right: 2px; border-bottom: 1.5px; border-left: 2.5px; border-color: blue; border-style: solid}

This can all be consolidated down to the CSS shortcut of:

.box {
border-width: 1px 2px 1.5px 2.5px; border: blue solid}

This makes a very unusually shapped box, but for a normal box in which all sides are equal:

.box {
border: 1px blue solid}

For more information on optimizing your HTML and CSS code for faster page loading, see our article series on Website Validation and Optimizing Your Web Pages.

Combining Classes and Declarations – Optimizing – Links and Resources

Our CSS Text Designs – Fonts, Text, Links, and Headings

Our articles on web page design cover a wide range of topics, all focused on designing web pages with Cascading Style Sheets (CSS). In this series, we focus on designing the smaller elements, the design elements found on a web page. You can find even more aggressive and unique designs in our CSS Experiments that might suit your web page design. Let’s start this section with fonts, text, links, and headings, the content design elements.

Fonts

Many of our designs began as CSS experiments, some trial and error before we found out what worked for us. So we are sharing with you some of the techniques that go into creating these pages and our CSS, HTML, and web page design elements.

We like to keep our site content simple and clean with good use of space. More importantly, our site is designed to be as user-friendly and accessible as possible. We want our site viewed by everyone and everything, from the blind and visually impaired to small handheld computer screens. Therefore, we set a base font and the rest of our fonts are set by percentage or fraction, allowing the user to override our font-sizes to accommodate their viewing needs.

Use also use a variety of similar fonts in our font-family list to increase the odds of the font we prefer showing up on the page. Fonts are only visible when the user has those fonts installed upon his or her computer. We always include a generic font reference to serif or sans-serif to ensure a specific look if not a specific font as a fallback.

body {
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:1em; color:black; background:white}

p {
position:relative; margin:0; font-weight:normal; padding:8px 7px 10px 10px; color:black; font-size:100%}

<p>This is an example of our paragraph font.</p>

This is an example of our paragraph font.

Headings

For the most part, our headings are simple and consistent throughout our site. As nature photographers, it was important that we present a very simple background and text format so our photographs would jump off the page with color and artistic and dramatic license. Therefore, we kept to a simple blue and white theme. Yet, as simple as the design is, within that theme there are shades of blue to add a little more impact.

Headline One

h1 {
position:relative; margin:0; font-weight:bold; font-size:130%; color:blue; padding-left:5px; padding-top:10px}

<h1>Headline One</h1>

Headline Two

h2 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:navy; padding-left:5px}

<h2>Headline Two</h2>

Headline Four

h4 {
position:relative; margin:0; font-weight:bold; font-size:105%; font-style:italic; color:blue; padding-top:1.5em}

<h4>Headline One</h4>

We decided to feature a bit of jazz in our H3 heading design. We use the H3 selector frequently in our articles to separate content into easily consumable sections. The H3 style sheet rules set the color and style of the text, then adds a line that goes across the page. At the end of the line along the right margin is a small photograph of ours. To add some variety, we change the picture and the color of the horizontal line dependent upon the seasons.

Spring

h3 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:blue; clear:right; padding-top:20px; margin-top:1em; border-bottom:1px #9999FF solid; background: url(images/core/h3summerphlox.jpg) right no-repeat}

<h3>This is the Spring Heading</h3>

Summer

h3 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:blue; clear:right; padding-top:20px; margin-top:1em; border-bottom:1px #CCCC99 solid; background: url(images/core/h3summermud.jpg) right no-repeat}

<h3>This is the Summer Heading</h3>

Summer Two

h3 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:blue; clear:right; padding-top:20px; margin-top:1em; border-bottom:1px #99CC99 solid; background: url(images/core/h3fern2.jpg) right no-repeat}

<h3>This is the Summer #2 Heading</h3>

Fall

h3 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:blue; clear:right; padding-top:20px; margin-top:1em; border-bottom:1px #FFCC66 solid; background: url(images/core/h3fallbar.jpg) right no-repeat}

<h3>This is the Fall Heading</h3>

Winter

h3 {
position:relative; margin:0; font-weight:bold; font-size:120%; color:blue; clear:right; padding-top:20px; margin-top:1em; border-bottom:1px #9999FF solid; background: url(images/core/h3icebar.gif) right no-repeat}

<h3>This is the Winter Heading</h3>

Headings – Links and Resources

Text Characteristics

Throughout a web page there will be text elements you want to look a certain way. This includes links, but we’ll get to those in a minute. Specifically, these are the occassional bit of color or an impact of bold or italic, or a positioning move to make the text look the way you want it to look. Here are a few of ours:

This is underlined

u, ins {
text-decoration:underline}

<u>This is underlined </u>

This is italic

i, cite, em, var {
font-style:italic}

<i>This is italic </i>

This is bold

b {
font-weight:600}

<b>This is bold </b>

This is code or keyboard style and it is an inline code which can sit inside of regular text.

tt, code, kbd, samp {
font-family:monospace; color:black}

<p>This is <code>code or keyboard style </code> and it is an inline code which can <code>sit inside of regular text. </code></p>

 This is pre, another form of code or keyboard style but it follows the formatting on the HTML sheet and doesn't wrap or sit inline with the regular text. 
pre {
font-family:monospace; color:black; white-space:pre; font-size:80%; padding-left:10px}

<pre>This is pre, another form of code
or keyboard style but it follows
the formatting on the HTML sheet
and doesn’t wrap or sit inline
with the regular text. </pre>

Special Text Classes

There are times when you want a certain line of text to stand out and look different from the rest, or a box border to change from blue to green. We’ve created a range of class selectors which change the color of all the selectors within the class. We use this occassionally to provide emphasis.

Everything in this line is blue.

.blue {
color:blue}

<p class=”blue”>Everything in this line is blue.</p>

This is Heading Two, normally blue forced to be red

.red {
color:red}

<h2 class=”red”>This is Heading Two, normally blue forced to be red</h2>

This is the code style which is now green.

.green {
color:#33CC00}

<code class=”green”>This is the code style which is now green.</code>

This is a combination of darkgreen color and medium font size.

.darkgreen {
color:#006600}

.medium {
font-size:85%}

<p class=”darkgreen medium”>This is a combination of darkgreen color and medium font size.</p>

(Note: We used a shorthand combination of two classes in this example. You can find more about this in our section on CSS shortcuts and shorthand.)

.navy {
color:#000099}

< pre class=”navy”>This is pre font style
but the color is forced to be navy.</pre>

There are times when we want something to be forced to be bold even though it isn’t normally, so we have a class selector set to be bold.

.bold {
font-weight:bold}

<p class=”bold”>There are times when we want something to be forced to be bold even though it isn’t normally, so we have a class selector set to be bold.</p>

Font-Size

When the design calls for it, we will change the size of the fonts. Rather than using forced font sizes, such as 14pt, we use relative sizes based upon the default font size which is set at 1em, approximately 12pt. The variable relative font size is represented by a percentage or fraction of the default. Using relative font sizes allows users with their own style sheets to overwrite ours for their special needs, and it allows flexibility for those who require larger or smaller fonts for better reading, controlled by the Internet browser (From the menu, VIEW, FONT-SIZE).

There are various ways to use these special sized fonts. They can be set in classes to be used with divisons or spans. Here is an example of each:

<p class=”medium”>This is a medium-sized font.</p>

<div class=”medium”>This is a medium-sized font.</div>

<p>This is normal type with a <span class=”medium”>span of medium type </span> in the middle.</p>

Let’s look at the specific CSS rules for a few of our special font sizes.

This is tiny example of our paragraph font.

.tiny {
font-size:60%}

<p class=”tiny”>This is tiny example of our paragraph font.</p>

This is x-small example of our paragraph font.

.x-small {
font-size:65%}

<p class=”x-small”>This is tiny example of our paragraph font.</p>

This is small example of our paragraph font.

.small {
font-size:70%}

<p class=”small”>This is small example of our paragraph font.</p>

This is medium example of our paragraph font.

.medium {
font-size:85%}

<p class=”medium”>This is medium example of our paragraph font.</p>

This is large example of our paragraph font.

.large {
font-size:105%}

<p class=”large”>This is large example of our paragraph font.</large>

This is x-large example of our paragraph font.

.x-large {
font-size:115%}

<p class=”x-large”>This is x-large example of our paragraph font.</x-large>

This is xx-large example of our paragraph font.

.xx-large {
font-size:120%}

<p class=”xx-large”>This is xx-large example of our paragraph font.</xx-large>

This is big example of our paragraph font.

.big {
font-size:150%}

<p class=”big”>This is big example of our paragraph font.</big>

Resources for Fonts and Text

Font Sizes

Font and Text Characteristics

Font Design Elements and Techniques

Font Surveys and Usage: Choosing Fonts

Designing Our Links

We wanted our links to blend into the content of the page while still standing out. But we also wanted them to be clearly recognized as links when the mouse hovers over the link.

a {
color:#0000CC; border:0; margin:0; padding:0; text-decoration:none}

a:active {
text-decoration:none}

a[href] {
text-decoration:none}

a:visited {
text-decoration:none; color:#006699}

a:hover {
color:#003399; text-decoration:none; background:#CCFFFF; border-bottom:2px solid #003399; border-top:2px solid #003399; border-left:0; border-right:0}

Move over the link to see it in action – http://www.cameraontheroad.com/index.html

We feature several thousand links to sites away from our own. Part of compliance with web and accessibility standards is designating which links are internal and which are external. External links will take the user away from your site. Because we have so many external links as part of the overall flow of our articles, we decided to clearly mark all external links with a dotted blue line underneath the link, a technique becoming very popular among web designers. Our policy states that these links will open in a new window, leaving our article still accessible to the user so they can continue to read on and not let the flow of the article be lost while still accessing the external information.

Because we set the overall look of the links previously, the external class rule merely adds the modification of a bottom dotted border for both the link and visited link.

This is an example of an external link to http://www.cnn.com, the popular news site.

a.external:link, a.external:visited {
border-bottom:.05em dotted; text-decoration:none}

<p>This is an example of an external link to <a title=”external site” href=”http://www.cnn.com/” class=”external”>CNN</a>, the popular news site.</p>

Our footer features some interesting links and hovers, adding a little drama to our page design. As mentioned, we want our links to stand out when the mouse passes over them (hover) but we wanted something a little different with our footer.

The hover links within our content feature a light blue color with a top and bottom border of dark blue (Move the mouse over any links in this paragraph to see the design). We changed this in our footer to create the same light blue background of color but with dark blue borders on the left and right sides of each hover link instead of the top and bottom. It is still consistent but different, adding a bit of fun to the design.

#footer {
clear:both; float:right; width:75%; padding:10px; color:#6633FF; font-weight:700; text-align:right; font-size:60%; border-top:1px solid blue}

#footer a {
font-weight:normal}

#footer a {
border-width:0 5px; border-left:solid white; border-right:solid white; color:#000099; background:transparent; padding:0 5px; text-decoration:none}

#footer a:visited {
color:#000099}

#footer a:hover {
border-width:0 5px; border:solid blue; background:#CCFFFF}

Our footer design which you can see at the bottom of this page in practice.

This is the HTML structure for the footer without our links.

<div id=”footer”>
</div>

This is the HTML structure for the footer with our footer links.

<div id=”footer”>
| <a title=”Home Page” accesskey=”1″ href=”../../index.html”>HOME</a> |
<a title=”Doing Zone” href=”../../doing.html”>DOING</a> |
<a title=”Being Zone” href=”../../being.html”>BEING</a> |
<a title=”Going Zone” href=”../../going.html”>GOING</a> |
<a title=”Living Zone” href=”../../living.html”>LIVING</a> | <a title=”Asking Zone” href=”../../asking.html”>ASKING</a> |
<a title=”Telling Zone” href=”../../telling.html”>TELLING</a> |
<a title=”Learning Zone” href=”../../learn.html”>LEARNING</a> |<br>

| <a accesskey=”6″ title=”Information about who we are and what we are doing” href=”../../about.html”>About Us</a> |
<a href=”../../learn/links.html” title=”External links and resources on nature photography, travel, writing, web design and more”>Links</a> |
<a title=”Article Reprint Request Information” href=”../../reprints.html”>Reprints</a> |
<a title=”Site Map” href=”../../sitemap.html”>Site Map</a> |
<a title=”Website Design Information and Resources” accesskey=”d” href=”../../doing/webdesign.html”>Design</a> |
<a title=”Our Legal Policies” accesskey=”8″ href=”../../doing/legal.html”>Legal</a> |
<a title=”Accessibility Information” accesskey=”0″ href=”../../doing/accessibility.html”>Accessibility</a> |<br>

| <a title=”Visit our Gallery of Images” href=”../../gallery.html”>Content and Photographs by Brent and Lorelle VanFossen</a> |<br>
<address>| <a title=”Call, email, or mail us” accesskey=”7″ href=”../../doing/contact.html”>Contact</a> | <a title=”our site home page” href=”http://www.cameraontheroad.com/”> http://www.cameraontheroad.com/ </a> |</address>
| <a title=”Copyright” href=”../../doing/copyrite.html”></a> |
</div>

Note: Notice the references to accesskey. These are the tab order in which someone can tab through a page to the most important links. These were left in to remind you to create accessible pages to comply with web standards. The order of the accesskeys is based upon your own design.

Resources About Links

Want More?

In our first section, we examined the innovative layout that we developed for our web pages. In the next section, we tackle the graphic fun of lists and boxes to add drama to your design. Then, we show you some of the little details we use to make our pages look special including the use of invisible text, forced white space, floats, and dealing with Internet browser software bugs. Our last section on CSS and HTML is on the tips and tricks we learned while changing and updating these pages.

Our HTML and CSS Codes – Lists and Boxes

Web pages are not just books on the Internet. Nor are they billboards. In general, they are informational and educational papers and brochures to help people learn and gather information to make decisions. The more precise the presention of the information, the faster the user can get to the information. Lists are excellent ways to present information in a quick and easy to read style. Highlighted container boxes within a page contain special information related to the content but distinct or worth calling attention to itself. Here are some examples of our lists and boxes.

Our Web Page Design Lists

Lists can be simple or fancy. We choose simple and clean. We have several different kinds of lists, including special list designs to fit within our various boxes and you will find those examples in our boxes section.

Our Basic List

This is our standard list found throughout our pages within the content. We’ve created a nested list with three levels. We mostly use only level one, but in our Links and Resources section of our site, we feature nested lists three levels deep.

  • This is Item One
  • This is Item Two
  • This is Item Three
    • This is Item Three A
    • This is Item Three B
      • This is Item Three B-1
      • This is Item Three B-2
    • This is Item Three C
  • This is Item Four
  • This is Item Five
CSS Style Sheet:
ul li, li.number {
list-style-type:upper-alpha}

ul {
margin:0.3em 2em; list-style-position:outside; list-style: url(images/core/ball.gif) disc; font-size:98%}

ul ul {
margin-top:0.3em; list-style: url(images/core/bullet.gif) square; font-size:96%}

ul ul ul {
margin-top:0.3em; list-style: url(images/core/ball1.gif) circle; font-size:95%}

li, li li, li li li {
padding:0.25px 10px 5px 0.25em}
HTML Structure:
<ul><li>This is Item One</li>
<li>This is Item Two</li>
<li>This is Item Three
<ul><li>This is Item Three A</li>
<li>This is Item Three B
<ul><li>This is Item Three B-1</li>
<li>This is Item Three B-2</li></ul> </li>
<li>This is Item Three C</li></ul> </li>
<li>This is Item Four</li>
<li>This is Item Five</li></ul>

NOTE: Nested lists require a little attention to detail. Notice the lack of an end </li> tag on two lines in the HTML structure above. They are there, but they are listed at the end of each sub-list. With the new web standards, every opening tag requires an end tag, and nested lists require end tags at the end of the nesting section. To help you follow this, we’ve highlighted the list end tags in red.

When Little Sized Lists Are Needed: The Small List

There are times when we need to have a smaller graphic image for our list because the font within that section is smaller. We don’t need a font size specification in the style sheet rule as the small class has already been identified as 70% of the default size. We simply need to define the graphic image of the list style.

  • This is Item One
  • This is Item Two
  • This is Item Three
ul.small {
list-style:url(images/core/ball1.gif) circle;}
<ul class=”small”>
<li>This is Item One</li>
<li>This is Item Two</li>
<li>This is Item Three</li>
</ul>

Our Definition List

We started using definition lists recently to create a more sophisticated layout list that involve more than a line of text. A definition list can be designed in several ways but it basically is used as a glossary or dictionary layout. A word or phrase is set aside and then next to or below it is the definition. Here is our layout for our definition lists which are used on all of our main section pages.

This Is The Word Or Phrase
This is the definition or explanation of the word or phrase.
Definition List Add Style
We like the bold title and boxy element for a different style of list on our pages. We use them on all of our section title pages and throughout our Learning Zone to help make our points.
 
CSS Style Sheet:
dl {
position:relative; margin:0 0 0 .5em; font-size:97%;font-weight:normal}

dt {
position:relative; font-weight:600; padding-top:.5em font-weight:normal;}

dd {
position:relative}
HTML Structure:
<dl>
<dt>This is the word or phrase</dt>
<dd>This is the definition or explanation of the word or phrase.</dd>
<dt>Definition List Add Style</dt>
<dd>We like the bold title and boxy element for a different style of list on our pages. We use them on all of our section title pages and throughout our <a title=”Our Learning Zone with articles about nature photography, travel, computers, and the Internet and web page design and development” href=”../../learn.html”>Learning Zone</a> to help make our points.</dd>
</dl>

Resources about CSS and HTML Lists

Our Web Page Design Boxes

Our Website features four main box styles for holding highlighted content separate from the rest of the page’s content. We call them plain, tip, blue, and sidebar. These are often referred to as pull-quotes, sidebars, or tip boxes. They are used to highlight quotes, tips, or notes that related to the content of the article and need special attention paid to them.

When we shifted our thinking from tables grid layout to CSS layouts, we learned that every selector was a container. Since everything fit inside a container, and there could be containers within containers, the only problem was figuring out how to make the containers stay within their parent containers and work with the other containers around them.

Once that idea was absorbed, the freedom in design could cut loose. Here are some of our boxes (containers within containers) that we use starting with the most basic to more sophisticated and dramatic.

Plain Boxes

We have three types of plain boxes: right, left, and wide. The right and left boxes sit on the right and left side of the page with the content flowing around them. The wide box sits on the left side of the page and stretches the width of the page and the text flows from above to below but not around it. This box allows us to put several images next to each other with a greater amount of information to accompany the images. We use the wide box in our Learning Zone a lot.

You may notice a strange code at the very beginning of the example. It is html > body. This is a hack or bug fix for Microsoft Internet Explorer which adds up margins differently than other browsers. This code sets the margin for the box within the body of the document rather than the container it resides within which helps to align it properly within the flow of the document. Otherwise the box can overlap the text and surrounding content.

These three boxes have the same code save for a couple of minor differences. Here is the code for the right box and below we will highlight the different code between the three boxes.

html > body .boxright {
margin-right:12px}

.boxright {
display:block; position:relative; float:right; margin-left:6px; width:40%; text-align:left; border:3px outset #333399; padding: 5px; background: transparent}

.boxright p {
font-size:85%; padding: 5px}

This is text that goes inside of the box and wraps around dependent upon the width of the box.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quam tortor, pulvinar ut, luctus vel, vestibulum id, wisi. Maecenas molestie sollicitudin velit. Duis bibendum elit vitae dui. Fusce feugiat, nunc quis euismod rutrum, neque mauris luctus tortor, ut tempus tortor orci quis mauris. Vestibulum sollicitudin pede vitae erat. Aenean purus velit, posuere non, auctor ut, hendrerit laoreet, wisi. Aliquam erat volutpat. Maecenas tempor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut pede quam, tincidunt in, scelerisque id, gravida eget, mauris.

<p> <div class=”boxright”><p>This is text that goes inside of the box and wraps around dependent upon the width of the box. </p></div>Lorem ipsum dolor sit amet, consectetuer adipiscing…

While the HTML structure for the left box is the same, we changed the CSS declarations to change the float from right to left and adjusted the hack accordingly.

html > body .boxleft {
margin-left:12px}

.boxleft {
display:block; position:relative; float:left; margin:0 2em 0 6px; width:40%; text-align:left; border:3px outset #333399; padding: 5px; background: transparent}

.boxleft p {
font-size:85%; padding: 5px}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quam tortor, pulvinar ut, luctus vel, vestibulum id, wisi. Maecenas molestie sollicitudin velit. Duis bibendum elit vitae dui. Fusce feugiat, nunc quis euismod rutrum, neque mauris luctus tortor, ut tempus tortor orci quis mauris. Vestibulum sollicitudin pede vitae erat. Aenean purus velit, posuere non, auctor ut, hendrerit laoreet, wisi. Aliquam erat volutpat. Maecenas tempor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut pede quam, tincidunt in, scelerisque id, gravida eget, mauris. Vivamus eleifend hendrerit diam. Aenean sagittis, sapien in pellentesque dapibus, justo erat semper augue, porta condimentum lectus purus in justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque gravida neque sollicitudin lorem vulputate gravida. Praesent sollicitudin elementum elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Example of a wide box in use from our Learning Zone educational articles Next is our wide box design. We’ve removed the float and stretch the width across the width of the page. The content text does not move around the sides of the box but is above it and then continues below the box.

We use the wide box a lot in our Learning Zone to showcase a point or example we need to make. As nature photographers, this often involves showcasing comparison photographs, showing what to do and what not to do, or similar images to make our point. We’ve included a graphic example of this technique to the right.

 

html > body .boxwide {
margin-left:12px}

.boxwide {
clear:both; display:block; position:relative; float:none; margin:1em; width:95%; text-align:left; border:3px outset #333399; padding: 5px; background: transparent}

.boxwide p {
font-size:85%; padding: 5px}

Plain Boxes – Titles, Headings, and Lists

Heading
Title Text

This is the text inside the box below the heading and title. We use different styles for the heading and title so we can choose between the two depending upon the emphasis we need to attract attention to the box. We usually only use one.

  • Item One
  • Item Two
  • Item Three

Featured inside these plain boxes may be titles and headings and lists. They are the same for all three plain boxes, creating a uniform look throughout the Website.

Using CSS Style Sheets, if we want to change the look and feel of our text boxes, especially the heading, titles, and fonts, we can easily change the main linked style sheet and the change would be felt across the entire Website. The simpler the design and structure of your boxes, the easier they are to mainstain.

 
.title {
display:block; font-weight:bold; font-size:90%; text-align:center}

.heading {
display:block; color;navy; font-weight:bold; font-size:110%; padding:0 0 5px 8px}

.boxleft ul, .boxright ul, .boxwide ul {
position:relative; margin:0; list-style: url(images/core/ball1.gif) square inside; font-size:90%}

<div class=”boxright”>
<div class=”heading”>This would be the heading if one was needed </div>
<div class=”title”>This is the Title </div>

<p>This is the text inside the box below the heading and title. We use different styles for the heading and title so we can choose between the two depending upon the emphasis we need to attract attention to the box. We usually only use one.</p>

<ul><li>Item One</li>
<li>Item Two</li>
<li>Item Three</li>
</ul>

</div>

Tip Box

Tip Box Title
This is the body of the tip box and below we have a list of the reasons why we use this tip box style:

  • It is consistent with the colors and design of the site
  • It attracts attention without screaming
  • Distinctive style lends recognition as good “tip” information found here
  • Simplistic design blends in with the content

The tip box is a simple box which features three sections, the container, the title, and the text body. The container is outlined in blue with a dividing line between the title and the text. The title is centered in bold with forced uppercase letters and a wider letter spacing than normal to make it more interesting.

The layout is simple and can be easily changed to have colored backgrounds and borders. The title element can have a solid background color or image, as can the text body element. The structure is simple, it’s up to you to create your own unique style.

html > body .boxtip {
margin-right:12px}

.boxtip {
display:block; position:relative; float:right; background:transparent; width:150px; padding:0; margin: 1em 0 1em .5em; border: 1px blue solid}

.tiptitle {
display:block; position:relative; background:transparent; width:100%; border-bottom:1px solid blue; padding: .15em .15em; color:navy; text-align:center; font-weight:bold; font-size:90%; text-transform:uppercase; letter-spacing: .1em}

.tipbody {
display:block; position:relative; background:transparent; margin: .6em .3em .6em .6em; font-size:85%; width:99%}

To add a list in our tip box, we added the following list code:

.boxtip ul {
margin:0; list-style: url(images/core/ball1.gif) square inside; font-size:90%}

.boxtip li {
margin:0}

The HTML for this code is:

<div class=”boxtip”>
<div class=”tiptitle”>Tip Box Title </div>

<div class=”tipbody”>This is the body of the tip box and below we have a list of the reasons why we use this tip box style:

<ul>
<li>It is consistent with the colors and design of the site</li>
<li>It attracts attention without screaming</li>
<li>Distinctive style lends recognition as good “tip” information found here</li>
<li>Simplistic design blends in with the content</li>
</ul>

</div>
</div>

Blue Box

Blue Box Title
This is the span text which is different from the rest of the text within the blue box. We use this box because:

  • It is consistent with the colors and design of the site
  • Attracts attention loudly
  • Distinctive style lends recognition as “important information” here
  • Simplistic design attracts attention while blending in with the content
  • Links are different colors because of the blue background

One of our favorite boxes is dramatic and attention getting. We call it the blue box as it features a two-toned blue color scheme with the title being darker and extending and overlapping the lighter blue box underneath. Into this box we put pull-quotes and information we really want to be noticed.

Like most web designers, we love to “borrow” design ideas. This particular look was inspired by Standardice in their Mimicking Magazines Experiment. We liked the look of the “Softer padding for the marginalized” box and did some tweaking to create our blue box.

The box elements consist of the outside container ( boxblue), the title ( bluetitle), a span within the title ( bluetitle span}
, the body ( bluebody) and a span within the body ( bluebody span). The two spans are inline modifications to those elements. The title span creates the dark blue background and allows the background to appear to extend outside the width of the main box. The title rule actually creates a fake “top” to the box underneath, which enhances the effect of the “floating off-sides” title.

The span within the bluebody text forces the beginning line of the body text to be in small caps and bold. This technique accentuates the opening paragraph and adds a bit of drama to the overall look. With a blue background, our blue links were lost in the background, so we changed the color of the links within the box so they would be visible.

html > body .boxblue {
margin-right:12px}

.boxblue {
position:relative; float:right;width: 30%; font: 1em/98% “Trebuchet MS”, Arial, Helvetica, sans-serif}

.boxblue div.bluetitle {
background:#0066FF;color:#99CCFF;font-size:15px;line-height:22px;z-index:1}

.boxblue div.bluetitle span {
padding:2px 3px;background:#000099;text-transform:uppercase;letter-spacing:0.1em;font-weight:bold}

.boxblue div.bluebody {
margin: 0 0 0 1.5em; padding: 10px;background:#0066FF; color:black;font-size:90%}

.boxblue div.bluebody span {
font-variant: small-caps; font-weight: bold; color:#000099}

.bluebody a {
color:#99FFFF}

.bluebody a:visited {
color:#99FFFF}

.bluebody a:hover {
color:navy}

The list style is the same as the tip box list style:

.boxblue ul {
margin:0; list-style: url(images/core/ball1.gif) square inside; font-size:90%}

.boxblue li {
margin:0}
}

The HTML for the blue box is:

<div class=”boxblue”>
<div class=”bluetitle”>
<span>Blue Box Title </span>
</div>

<div class=”bluebody”>
<span>This is the span text which is different </span> from the rest of the text within the blue box. We use this box because:

<ul>
<li>It is consistent with the colors and design of the site</li>
<li>It attracts attention with screaming</li>
<li>Distinctive style lends recognition as “important information” here</li>
<li>Simplistic design attracts attention while blending in with the content</li>
<li>Links are <a title=”link to this page” href=”thispage.html#bluebox”>different colors</a> because of the blue background</li>
</ul>

</div>
</div>

Sidebar Boxes

Graphic of our Connect the Dots sidebar - click to see the real thing. We feature two different container boxes within our sidebar. The first ones we call Connect the Dots and the second ones are tip boxes that have been adjusted to fit within the narrow margins of the sidebar. The Connect the Dots boxes are unique from the rest of our boxes visually. They are not enclosed but rather framed with a blue line below the title and along the right side. They are designed specifically to hold lists of links highlighted by a small silver ball as a bullet.

In the previous boxes, we established their division sets as classes which confined the content. Here, we simply set a class statement and then redesigned how the paragraph ( <p>) and list ( <ul>, <li>) descendent selectors should look under the dots class. The H5 header is followed by the paragraph, if there is some text to be had, and then the list codes to create the Connect the Dots look. This keeps the HTML elements code and structure simple and easy to manage.

/* Connect the Dots */
.dots {
padding:5px 3px 5px 0}

.dots h6, .dots h5 {
font-family:”Comic Sans MS”, Arial, helvetica, geneva, sans-serif; text-align:left}

.dots h5 {
margin:0; color:#003399; font-size:1em}

.dots h6 {
color:blue; font-size:.85em; margin-bottom:2px;padding-right:3px}

.dots a:link {
text-decoration:none}

.dots ul {
list-style:url(images/core/ball1.gif) disc; list-style-position:outside; margin:0 ; padding:.2em 0 .3em 1em;border-top:1px blue solid; border-right:1px blue solid}

.dots li {
margin:0; font-size:80%}
<div class=”dots”>
<h5>Dots Title </h5>
<p>This is text for dots, if required.</p>
<ul>
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
<li>Link 4</li>
</ul>
</div>

These are examples of the container boxes we use on our web pages. In our CSS Fun, Tips and Tricks article, we come up with a wide variety of different looks for container boxes to help you learn more about the power of CSS.

Creating Boxes – Links and Resources

Our HTML and CSS Codes – Our Advanced Javascripts

We’ve looked at some of the simple scripts used within our web page design. Now we will look at some of the more complex scripts we use to create a more interactive and animated web page design and layout.

[Note: We don’t use most of these javascripts any more, but we did for several years, so we enjoy showing them off, hoping others can use them with their web page designs and layout. Since moving to WordPress, most of these features are now handled by PHP and WordPress Plugins.]

Message of the Day Javascript

The JavaScript Source is a major source of javascripts for us. We love the serious way they take javascripts, offering a wide range for all needs. One of their javascripts sets up an array, like a small database of possiblities, and then posts that message so it changes every day, a new message every day, until the end of the month when it starts the cycle over. We use this script in a variety of ways.

In our Connect the Dots sidebar, the top item on the list changes every day so a different article is featured. At the bottom of our sidebar is a tip of the day on travel or nature photography. Both of these use the same javascript with different information. We use another similar javascript that presents rotating information with every refresh of the screen. We’ll get to that one in a moment.

The basic javascript is shown first, and then we’ve included a couple of examples of how we use it.

<!–JavaScript Source javascript.internet.com –>
<!–Original: Mike W. (mikew@dvol.com) –>
<!–Website: http://www.dvol.com/~users/mikew –>

// Message of the Day
var msg1 = new Array();
Stamp = new Date();
today = Stamp.getDate();
msg1[1] = “Some witty and brilliant comment here.”;
msg1[2] = “I know a good story, how about you?”;
msg1[3] = “Do you have something interesting to say?”;
msg1[4] = “New message here.”;
msg1[5] = “New message here.”;
msg1[6] = “New message here.”;
msg1[7] = “New message here.”;
msg1[8] = “New message here.”;
msg1[9] = “New message here.”;
msg1[10] = “New message here.”;
msg1[11] = “New message here.”;
msg1[12] = “New message here.”;
msg1[13] = “New message here.”;
msg1[14] = “New message here.”;
msg1[15] = “New message here.”;
msg1[16] = “New message here.”;
msg1[17] = “New message here.”;
msg1[18] = “New message here.”;
msg1[19] = “New message here.”;
msg1[20] = “New message here.”;
msg1[21] = “New message here.”;
msg1[22] = “New message here.”;
msg1[23] = “New message here.”;
msg1[24] = “New message here.”;
msg1[25] = “New message here.”;
msg1[26] = “New message here.”;
msg1[27] = “New message here.”;
msg1[28] = “New message here.”;
msg1[29] = “New message here.”;
msg1[30] = “New message here.”;
msg1[31] = “New message here.”;
function feature() {

document.write(msg1[today]);
}

In the example below, we use this javascript to highlight one article a day as the featured article. Notice how left slashes were used before every quote mark in the web page address. This causes the javascript to ignore the quote marks and simply “write” them to the screen as any other text content. We only listed part of our version of the script to give you an idea of how we use it.

<!–JavaScript Source javascript.internet.com –>
<!–Original: Mike W. (mikew@dvol.com) –>
<!–Website: http://www.dvol.com/~users/mikew –>

<!–Feature Article for Connect the Dots –>
var msg1 = new Array();
Stamp = new Date();
today = Stamp.getDate();
msg1[1] = “<a href= learn/biz/write1.html>Photo/Writing: Enhance Your Story with Photographs</a>”;
msg1[2] = “<a href=”living/workroad.html”>Travel: Working on the Road</a>”;
msg1[3] = “<a href=”learn/weather/winterwhite.html”>Weather Photography: Winter Whites</a>”;
msg1[4] = “<a href=”learn/wild.html”>Wild Things: Photographing Wildlife</a>”;
msg1[5] = “<a href=”…

[BREAK]

…href=”learn/biz/10words.html”>Networking for Photo Business Sucess</a>”;
function feature() {

document.write(msg1[today]);
}

And we use this javascript in our HTML web page like this:

<div class=”dots”><a name=”dots”><h5>Connect the Dots</h5></a>
<ul><li> <script type=”text/javascript”>
<!–
feature();
//–></script></li>
<li><a title=”check out what is new!” accesskey=”2″ tabindex=”13″ href=”doing/whatnew.html”>What’s New?</a></li>
<li><a title=”information about who we are” accesskey=”5″ tabindex=”14″ href=”about.html”>About Us</a></li>
<li><a title=”new gallery images” tabindex=”15″ href=”gallery.html”>Gallery Images</a></li>…

In this version of the same script, we feature a tip a day for our sidebar. The tips consist of a couple of paragraphs of information and the line breaks inside of the paragraphs are created by using forced line breaks (<br>) to create the space. We use email and web page addresses inside of these messages, too. Be sure and add a left slash before every quote mark in these addresses. At the bottom of the script is the HTML layout that the script writes to the screen and displays the content of the message. It uses the javascript command document.write which writes the content to the screen, including the HTML tags.

<!–JavaScript Source javascript.internet.com –>
<!–Original: Mike W. (mikew@dvol.com) –>
<!–Website: http://www.dvol.com/~users/mikew –>

<!–Tip of the Day for Sidebar –>
function tip() {

var msg = new Array();
Stamp = new Date();
today = Stamp.getDate();
msg[1] = “Remember, you can turn off the Program Mode on your camera and take advantage of the aperture and shutter to control different aspects of your composition. A smaller aperture creates a deeper depth of field, increasing your range of what is in focus. In reverse, it can also put things in the foreground and background out of focus, accentuating your subject and separating it from the background. <br><br>Shutter speed controls the ‘motion’ of your subject and the things around it. A slow shutter speed makes water silky and soft, while a fast shutter speed freezes the action. These two tools are part of your compositional arsenal. Take advantage of them.”;
msg[2] = “The closer your lens is to the subject, the less depth of field you have in your final image. For extreme closeup photography, your depth of field may be measured in millimeters, though with most closeup work, centimeters is typical.<br><br>To check your depth of field, use the depth-of-field preview button to manually close your aperture to the set opening. Called the ‘make it dark’ button, your image will darken and the focus and out-of-focus areas will be clearer. Adjust as necessary.<br><br>Older lenses offer a depth of field range guide on the lens barrel. From a tick mark, go to the two ends where it states your aperture spot, and relate these to the measurement scale, in feet and meters, to determine the range of focus.”;
msg[3] = “Working with extreme closeups, light is often a challenge and a problem….

[BREAK]

…Keep your hat tied tightly to your head, too, because it never fails that your hat blowing off your head will distract your subject or cause you to miss the shot.<br><br>Do you have a photo tip you would like to share with others? Email us at <a title=”email us with a photo tip” href=”mailto:email@example.com?subject=I have a photo tip for you”>email@example.com</a> with your tip and we’ll add it to your tip list. Thanks for helping!”;
msg[31] = “When choosing your sunglasses for your photographic traveling adventures, take extra care to choose a good pair that offer anti-glare coating, and that are not colorized, influencing the coloration of what you are seeing. Some lenses enhance the colors to make them more blue, red, green, or orange. Stick to lenses that make the view ‘natural’, helping you to see more clearly what there is to photograph.”;

function tip() {

document.write (“<div class=”tip”><h4>Daily<br>Photo Tip</h4><p>\r\n”);
document.write(msg[today]);
document.write (“</p></div>\r\n”);
}

}

We call out the javascript which includes our HTML formating like this:

<script type=”text/javascript” src=”scripts/tipmain.js”> </script>
<script type=”text/javascript”>
<!–
tip();
//–></script></div>

Quote of the Moment Javascript

Similar to the message of the day, we also use a javascript which changes the message with every screen refresh. Near the bottom of our sidebar we feature an image of the day along with quotes which change with every page or screen refresh. The Javascript works on a variable which randomly picks a number which results in the posting of a random quote. The number of quotes within your array is up to you. We have over 100 quotes in our javascript but you can have less.

We’ve included the simple empty version of the quote of the moment javascript along with a sample of our own layout. The quotes within the array have a few interesting features that need to be taken into consideration.

  • All closing tags require a left slash such as <i>italic word</i> would be <i>italic word<\/i>
  • All semi-colons require a left slash such as “The earth does not belong to man\; man belongs to the earth.”
  • All apostrophes (‘) must be represented with its extended character code such as “an insect’s wings” should be “an insect&#39;s wings”
  • Place the number of quotes plus one in the following line (replace the ten) of the javascript: var quote= new makeArray (10);

To see this javascript in action, check out our sidebar’s “The Art of Nature” and hit the F5 key or click the refresh or reload button on the toolbar of your browser to reload the page and watch the quotes change each time.

//Array function
function makeArray(len) {

for (var i = 0; i<len; i++) this[i] = null;
this.length = len;
}

//Array of quotes – place number of quotes plus one here
var quote = new makeArray (10);

quote[0] = ‘Quote message’;
quote[1] = ‘Quote message’;
quote[2] = ‘Quote message’;
quote[3] = ‘Quote message’;
quote[4] = ‘Quote message’;
quote[5] = ‘Quote message’;
quote[6] = ‘Quote message’;
quote[7] = ‘Quote message’;
quote[8] = ‘Quote message’;
quote[9] = ‘Quote message’;

//random number generator
function rand(n) {

seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}

document.write(“<div class=”quotebody”>\r\n”);
var now = new Date()
var seed = now.getTime() % 0xfffffff
document.write(quote[rand(quote.length)])
document.write(“</div>\r\n”);

This is our example of how we use our quote of the moment javascript. Pay attention to the use of HTML opening and closing tags, semi-colons and other content within the quotes.

//Array function
function makeArray(len) {

for (var i = 0; i<len; i++) this[i] = null;
this.length = len;
}

//Array of quotes
var quote = new makeArray(136);
quote[0] = ‘You must teach our children that the ground beneath their feet is the ashes of your grandfathers. So that they will respect the land, tell your children that the earth is rich with the lives of our kin. Teach your children what we have taught our children, that the earth is our mother. Whatever befalls the earth befalls the sons of the earth … This we know: The earth does not belong to man\; man belongs to the earth. This we know. All things are connected … <br><i>Inspired by Chief Seattle, 1854<\/i>’;
quote[1] = ‘The shadow’s the thing. Outside, shadows are blue, I read, because they are lighted by the blue sky and not the yellow sun. Their blueness bespeaks infinitesimal particles scattered down infinitesimal distances. Muslims, whose religion bans representational art as idolatrous, don’t observe the rule strictly\; but they do forbid sculpture, because it casts a shadow. So shadows define the real … .<br><i>Anne Dillard Pilgrim at Tinker Creek<\/i>’;
quote[2] = ‘Wildlife needs clutter and chaos. It needs options and opportunities. It needs the slow centuries of growth, nurture, disturbance and decline that produces a complex and unique forest community.<br><i>David Middleton, Ancient Growth<\/i>’;
quote[3] = ‘Our ways are different from your ways….
[BREAK]

…a state of harmony between men and land.<br><i>Aldo Leopold<\/i>’;
quote[135] = ‘Solitary trees, if they grow at all, grow stong.<br><i>Winston Churchill<\/i>’;

//random number generator
function rand(n) {

seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}

document.write(“<div class=”quotebody”>\r\n”);
var now = new Date()
var seed = now.getTime() % 0xfffffff
document.write(quote[rand(quote.length)])
document.write(“</div>\r\n”);

The Art of Nature

To create our “The Art of Nature” box in the side bar, we use three javascripts outlined in the text ( image of the day, quote of the moment, and tip of the day) which include the HTML structure and CSS references for prsentation within the javascript itself. The following is the HTML code found on every page within our site which initiates the javascripts in the sidebar.

<div class=”boxes”>
<script type=”text/javascript” src=”scripts/imageday.js”> </script>
<script type=”text/javascript”>
<!–
imageday();
//–></script>
<script type=”text/javascript” src=”scripts/photoq.js”> </script>
</div>

Image of the Day Javascript

As nature photographers, we never miss an opportunity to show off our beautiful nature images. Our image of the day javascript gives us the chance to showcase seven different images cycling every day over a week. Every few months we change these seven images to showcase more beautiful nature photography. We’ve combined these with our quote of the moment javascript in our “The Art of Nature” section of our sidebar.

The script itself is a fairly simple array of seven images on a list. A document.write function places one of these image files into the layout on our page. Using style codes, we’ve created a nice presentation design for the images and the quote below.

There are a few constraints to the javascript.

  • The images must sit in the same directory as designated with the img src location within the document.write layout.
  • The images must be approximately the same size to fit within the designed container and space allowed, though with less constraint on the container’s design, there could be some size variance.
// Image Per Day JavaScript Sourcejavascript.internet.com
function imageday(){

today = new Date();
day = today.getDay();
arday = new Array(” ferns.jpg”, “blueeye.jpg”, “dewweb.jpg”, “frog.jpg”, “monkeywhite.jpg”, “foxcloseup.jpg”, “herontricolor.jpg“);
document.write(“<div class=”sidetitle”><a title=”Visit our Nature and Travel Photography Gallery” tabindex=”23″ href=”gallery.html”>The Art of Nature</a></div><img class=”noborder” src=’images/core/” + arday[day] + “‘><br>”);
}

Style Sheet:
#sidebar.sidetitle {
font-style:normal; border-top:1px solid #333;
border-bottom:1px solid blue; padding:.15em .5em;
color:navy; text-align:center; font-weight:bold;
text-transform:uppercase; letter-spacing:.1em}

img.noborder {
margin:0; padding:0}

HTML to Javascript: Content as a Javascript

We use another technique involving javascripts with the help of a great program from Byte-size Software called Javascript Maker. In places where we have redundant text and code on every page within our Website, like the sidebar links, Javascript Maker turns that HTML into javascript that “writes” the information to the page so it is visible on the screen. If I need to make a change in the content, instead of changing the information on a couple hundred web pages, I simply change the script file and when the javascript runs, the updated information is there. Anything that makes for less work is welcome here.

Javascript Maker takes your HTML file and turns it into javascript using the document.write function. You can do this yourself manually, but it is best to learn a bit about javascript programing and code writing before stepping into this. Using Javascript Maker takes seconds to change HTML into javascript.

The following is a sample of our links for our Toshi’s Tails web pages which include articles about taking your pet on the road traveling.

<h6>Toshi’s Tails</h6>
<ul><li><a title=”article about taking your pet on the road.” href=”going/toshi.html”>Toshi’s Tales</a></li>
<li><a title=”article about taking your cat on the road” href=”going/catroad.html”>Cat on the Road</a></li>
<li><a title=”journal story about Dahni the cat” href=”going/dahni.html”>Lessons Learned from Dahni, the Eyeless Wonder Cat</a></li>
<li><a title=”article about Dahni written up in a magazine” href=”going/dahninews.html”>Dahni in the News!</a></li>
</ul>

The following is the same HTML information written as javascript.

function toshi() {

document.write (“<h6>Toshi’s Tails</h6>\r\n”);
document.write (“<ul><li><a title=”article about taking your pet on the road.” href=”going/toshi.html”>Toshi’s Tales</a></li>\r\n”);
document.write (“<li><a title=”article about taking your cat on the road” href=”going/catroad.html”>Cat on the Road</a></li>\r\n”);
document.write (“<li><a title=”journal story about Dahni the cat” href=”going/dahni.html”>Lessons Learned from Dahni, the Eyeless Wonder Cat</a></li>\r\n”);
document.write (“<li><a title=”article about Dahni written up in a magazine” href=”going/dahninews.html”>Dahni in the News!</a></li>\r\n”);
document.write (“</ul>\r\n”);
}

To activate javascript in HMTL:
<script type=”text/javascript” src=”../scripts/lists/toshi.js”> </script>

<script type=”text/javascript”>
<!–
toshi();
//–></script>

Consolidating Javascripts – Optimization

A web page’s size is based upon the sum of the HTML file, the CSS file, all graphics and images embedded in the HTML and CSS file, and all javascripts called out from within the HTML file. The more javascripts loading, the longer the entire page takes to load.

Many of the javascripts shown are on all of our pages all the time. Instead of having individual javascript loading, we’ve combined most of them into a single file. With fewer files loading with our web page, we can speed up the time it takes for a web page’s content to pop into view.

Besides reducing the number of javascripts loading, and shrinking the file sizes, if you use Website traffic and statistic analyzing tools like Webanalyzer or Analog, there is a section that lists the most popular files accessed. The more javascripts used, the more those files will be at the top of your most accessed lists, not giving you the real information about which web pages are being accessed the most. By limiting the number of javascript files embedded in your web pages, hopefully you will start to see more HTML pages come up on the URL list over time.

Here are a few rules to keep in mind as you combine your javascripts into a single file.

  • The names of each javascript ( function name()) must be unique within that javascrpt.
  • Keep window event handlers to a minimum so they don’t conflict with each other.
  • Keep the javascript source and copyright information together with each javascript to help you track down the resource if a problem occurs later.

How Combining Javascript Files Works

To begin the process of combining javascript files into one file, copy and paste each script into a single file and check each one for repeated names or call-outs (arrays, etc.). Make sure each one is unique to itself.

Separate each script with a comment that designates the next script’s name and action, source and copyright information.

When completed, save the file as a javascript file and set the script call-out to load from within the head of your web page.

<script type=”text/javascript” src=”../scripts/lists/grouped.js”> </script>

To initiate the specific javascript from within the “grouped.js” file within your document, enter the javascript function call-out like these examples:

<h6>List of Items</h6>
<ul><li> <script type=”text/javascript”>
<!–
javascriptone();
//–></script></li>
<li><a href=”listtwo.html”>List Two</a></li>
<li><a href=”listhree.html”>List Three</a></li> </ul>

<div id=”box”>
<script type=”text/javascript”>
<!–
javascripttwo();
//–></script> </div>

Here is a sample of part of one of our javascripts which uses a combination of javascripts in a single file.

// Image Per Day JavaScript Source javascript.internet.com
function imageday(){

today = new Date();
day = today.getDay();
arday = new Array(“ferns.jpg”, “blueeye.jpg”, “dewweb.jpg”, “frog.jpg”, “monkeywhite.jpg”, “foxcloseup.jpg”, “herontricolor.jpg”);
document.write(“<div class=”sidetitle”><a title=”Visit our Nature and Travel Photography Gallery” tabindex=”23″ href=”gallery.html”>The Art of Nature</a></div><img class=”noborder” src=’images/core/” + arday[day] + “‘><br>”);
}

// Checknew
// Nicolas www.javascript-page.com and javascript.internet.com
function checknew(date) {

var pic = “images/core/new.gif”;
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write(“<img class=”noborder” src=” + pic + “>”);
}

// Copyright – ATOJ(c)2002 www.atouchofjamaica.com
function right() {

copyright=new Date();
update=copyright.getYear();
document.write(“Copyright © 1996-“+ update + “”);
}

// Update Original: Nicolas www.javascript-page.com
function update(date) {

var pic = “images/core/update.gif”;
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write(“<img class=”noborder” src=” + pic + “>”);
}

// Page Updated Original: Kenneth Preston drkennan at ionet.net
// The JavaScript Source javascript.internet.com
function updatepage() {

var m = “Page updated ” + document.lastModified;
var p = m.length-8;
document.write(m.substring(p, 0));
}

// Unframe
function unframe() {

if (top.location !=self.location) {

top.location = self.location
}

}

Want To Know More About Javascripts?

As you’ve seen from our few examples, javascripts are quite capable little programs that help animate and complement a web page. If you would like to know more about javascripts, writing, editing, creating, or just using them, or about how to make them benefit you on your Website, we’ve included a list of helful resources and links about javascripts.

Links and Resources for Javascripts

Our HTML and CSS Codes – Our Javascripts

Javascripts are incredibly useful tools for web designers. In the right hands they can add usefulness and class to a web page design. In the wrong hands, they can be used to dance, sparkle, wiggle, and ballistically assault a viewer.

Basically, javascripts are programs that run from within a web site. They can be simple such as the one we use to show the date the file was last updated, or complex, calculating massive data information and returning an answer, such as those found on our Travel Tools pages which calculate distance between points, convert measurements, and more. They can also make things happen on the screen which some web designers think is entertaining to their viewers. Sometimes they are, and sometimes they aren’t. Examples of these include taking over your mouse pointer so that it becomes a butterfly or a butterfly chases it across the screen. Or making it “snow” on the web page. These can be great fun when used appropriately.

We’d like to share with you a few of our favorite javascripts and a program we use to write the javascripts which create our side bar menus. We consider these more in the “useful” area of web design rather than the sparkly and pretty. For those into the pretty javascripts, we’ve included some links and resources to help you find plenty of javascripts to keep you busy for a long time.

[Note: With our new move to WordPress, we aren’t using most of these javascripts any more as many of these functions are built into the program. Still, they are wonderful tools.]

Javascripts are currently recognized by most web browsers, though they are not readily accepted by handheld media, web TV and other new media types. Web page reader programs tend to skip through javascripts, though some try to make sense of them, if there is sense to be had of the javascript’s code.


If you do use scripts for critical design or information elements on your web page, make sure you include alternative content in case the javascript doesn’t work. An example would be:

<script type=”text/javascript” src=”/scripts/alphabet.js”></script>
<script type=”text/javascript”>
<!–
alphabet();
//–></script>
<noscript>
Note: Browser unable to display javascripts!

These are the letters of the alphabet: a b c d e f g h i j k l m n o p q r s t u v w x y z.
</noscript>

Our javascripts come from a variety of sources but we mostly enjoy the freeware javascripts from Javascripts.com, Dynamic Drive, and The JavaScript Source.

Javascripts – Links and Resources

 

Simple and Powerful Javascript Tools

We have a few javascripts we enjoy using on our web pages to add a bit of splash and provide useful tools to help us create our web page design.

Page Update Javascript

We use this javascript on every page. Set below the footer on every page, it reports the date of the file, representing the last time the file was saved. While this isn’t a perfect scorecard for when the page was honestly updated but rather saved to disk, it does help us find out which pages might not have been uploaded with fixes and repairs. And if there have been no changes to the web page’s code or structure, it can give us an idea of how long it has been since we checked that page out or made a change in it.

<script type=”text/javascript” src=”/scripts/updatepage.js”> </script>

<script type=”text/javascript”>
<!–
updatepage();
//–></script>

 
// Page Updated Original: Kenneth Preston drkennan at ionet.net */
// The JavaScript Source javascript.internet.com */
function updatepage() {

var m = “Page updated ” + document.lastModified;
var p = m.length-8;
document.write(m.substring(p, 0));
}
 

New and Updated Javascript

We are constantly adding new articles and updating our articles. Keeping track of what is new and updated is hard work with over 500 web pages on our site. This javascript checks the “expiration” date listed as a variable within it and if the date is still “fresh”, it shows the graphic for “New” or “Updated”. If it has expired, it will stop the graphic showing and disappear. A very helpful javascript.

Article About Web Page Design

Article About Our Web Page Designs

We use the exact same code with two different graphics. We’ve added a class statement to the image to make sure there are no margins or paddings or borders set around the graphic so it fits on the line. We set the expiration date on the call out for the javascript.

We have a lot of viewers who are visually impaired and “older” and they don’t like things that flash and sparkle on a web page. Lucky us, they are vocal in their complaints and after a couple of email requests, we redesigned our animated NEW and UPDATED graphics to only cycle 50 times or less through their rotating flashes. It usually ends within a minute. To see it in action, refresh the page by hitting REFRESH from the menu or the F5 key and watch the animated graphics until they stop. The UPDATED graphic “revolves” slower so it takes longer than the NEW to stop its animation.

<script type=”text/javascript” src=”/scripts/checknew.js”></script>
<script type=”text/javascript” src=”/scripts/update.js”></script>

<p> <script type=”text/javascript”>
<!–
checknew(“12/15/2006”)
//–></script>Article About Web Page Design</p>
<p> <script type=”text/javascript”>
<!–
update(“12/15/2006”)
//–></script>Article About Our Web Page Designs</p>
// Checknew
function checknew(date) {

var pic = “images/core/new.gif”;
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write(“<img class=”noborder” src=” + pic + “>”);
}

// Updated
function update(date) {

var pic = “images/core/update.gif”;
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write(“<img class=”noborder” src=” + pic + “>”);
}

// Nicolas www.javascript-page.com and javascript.internet.com

Style Sheet:
img.noborder {
margin:0; padding:0; border:0}

No Right Click on Images Javascript

After ages of fighting the paranoia that comes with displaying images on Websites (theft and copyright violations), I found this great javascript from Dynamic Drive Javascripts that allows the user to easily right-click all over our pages but NOT right-click on our images. Excellent!!

Grizzly Bear closeup, photograph by Lorelle VanFossen As a power Internet user, I depend upon the right-click menu to get around, print, open links, and do a variety of things that come from the right-click menu on web pages. The “no right click” javascripts I found before turned off all usage of the right-click menu, limiting this powerful tool on our own Website. This great “no right click image” javascript recognizes when the user is right-clicking over an image and when they are right-clicking anywhere else. This detection process puts a restriction on our images from easily being stolen, and returns the right click menu to its full capabilities. I love it.

To see this script in action, right click anywhere on the screen and the traditional right click menu will appear if your operating system and browser supports it. Right click over the image to the left and see what happens. [ Editor’s Note: Yes, I, a female, took that picture. Want to know more? Left click the photograph.]

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/
var clickmessage=”Right click disabled on images!”
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName==”IMG”){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName==”IMG”){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()

Copyright Javascript

As nature photographers and editorial writers, the issue of copyrights is very important to us. Maintaining all these copyright dates from year to year is a pain. So why not take advantage of a useful javascript tool from A Touch of Jamaica to make the job easier. The javascript lists the starting year and then checks to see what the system date is and puts the current year into the variable.

<script type=”text/javascript” src=”/scripts/copyright.js”></script>

<script type=”text/javascript”>
<!–
right();
//–></script>

// Copyright – ATOJ(c)2002 www.atouchofjamaica.com
function right() {

copyright=new Date();
update=copyright.getYear();
document.write(“Copyright © 1996-“+ update + “”);
}

Unframe Us!! Javascript

While I understand the need for Websites to include their top frame when a visitor links to our site from theirs, we actually can’t stand it. It messes with the design and isn’t user friendly. So we came up with a javascript that removes frames that arrive when a visitor comes to our site.

<script type=”text/javascript” src=”/scripts/unframe.js”></script>

<script type=”text/javascript”>
<!–
unframe();
//–></script>

function unframe() {

if (top.location !=self.location) {

top.location = self.location
}

}

Want More?

In part two of a look at our javascripts, we tackle the more sophisticated javascripts within our pages including the quote of the moment and image of the day, and give you information on how to streamline your web page redundant code and combine javascript files into one single file for faster loading.

Our HTML and CSS Codes – It’s All In The Details

We have a lot of small details that make our page design easy to use and pretty. Some are simple bits and pieces of style code that make things easier, such as spacers, while others are a little more sophisticated. All fill a need.

Background Images – Our Header

Our Website header for Taking Your Camera on the Road

We’ve showed you the code for our header layout and here is a more detailed look. We chose to have a header that would display text for printing and non-graphic viewers while also including a graphic for the visual display.

Within the code below there is a background image. An image placed within a CSS selector sits in the background, so to speak, of a page rather than on the page itself like an embedded graphic. Because the background graphic is within the style sheet code, when the style sheet is absent, such as with software for the blind and visually impaired, the graphic is invisible to the reader.

The background image is positioned relative to the container it resides in. The various declaratons include defining if the graphic is repeated, not repeated, and if repeated, how many times and in which directions; and the relative position (top, bottom, left, right) within the container. The repeating factor is based upon an x-y grid with repeat-x across and repeat-y vertical. We have ours set to not repeat and to sit in the left, bottom corner, fixed in place.

#header {
display:block; padding:0 3px; width:100%; height:100px;
background:url(“images/core/takelogo.jpg”) no-repeat left bottom fixed}

#header p {
position:relative; margin:0; font-style:italic; text-align:right; font-size:65%; color:blue}

The HTML code is very simple, which makes a lean HTML file and makes it easier to change in the future.

<div id=”header”><p><b>Taking Your Camera On The Road:</b><br>
Tips, tricks, and techniques for the traveling nature photographer</p></div>

CSS Backgrounds – Links and Resources

Borders – Images and Image Links

We host a lot of information and articles within our pages and every character of content or code adds up. Therefore, we fuss a bit trying to save every byte by optimizing our site as much as possible, getting rid of stray spaces in the codes and redundant codes. One of the redundant and useless codes put in by our HTML editor (and most others) occurs when an image is embedded within an HTML file. Along with the height and width of the image, a declaration is added which states border="0". This is all fine if we cared about the fact that the image has no border, but it doesn’t. So we don’t need the wasted attribute.

In our HTML pages, we did a multiple file search and replace and removed all references to border="0". Remember to add a space bar before or after to clean up the double space left behind by the attribute’s removal. In our style sheet, we add the following rule:

img {
border:0}

This simple effort removed over 50,000 bytes from our web pages, an average of 5,000 bytes per page file. Instantly, a 25K file becomes 20K, reducing the file size by 5%. If we want a border around an image, we define it as a class selector since it will change only the images we want to have a border and not every image on the site.

Notice the border boxes around the icons which are linked graphics. With the CSS code, the linked graphic loses the box around it, looking clean and simple. There is one small drawback. If you create a link in the form of a graphic, the link creates a border around the graphic to designate it as a link. While this is a good idea, making it clear what is a link and what isn’t, a bright purple border around your white background graphic isn’t very graphically pleasing. To remove the borders from the links from the linked graphics, we added another rule:

a img {
border:0}

The border around the graphic is gone and the design is clean and simple again. If the mouse moves over the graphic, it will still behave with the a:hover link design, you just don’t see the inactive link border highlight. Clean and simple.

Invisible Comments and Code

We sometimes have content we don’t want visible on the screen. One such code is a PHP code which activates a responding email when a search engine’s robot or spider crawls through our web pages. This way I know when and which search engine has visited my page. I don’t want this code to be visible to the audience but it has to be visible to the robot and spider. We have two ways of hiding this text. The first method is to not display it.

.invisible {
position:relative; display:none}

<p class=”invisible”>You can’t see anything because it isn’t really here.</p>

We make a policy of avoiding webpage spam and filling up our try to fool search engines. They know this trick and it can get you banned from their lists. Don’t play any games trying to attract attention. Do it right, meet the web standards validation, and your ability to soar up search engines will happen, done the right way not the sneaky way.

Making content disappear with display:none doesn’t make it go away. Users with screen-reading software may “read” the hidden code or content, so it doesn’t disappear completely. Use this technique sparingly.

Our Web Page Design Empty Spaces

On occasion we need to add blank space or white space between elements to avoid crowding on top of each other. If we can’t set the white space within our style code, we have to use a “spacer” to force the space into place. Our spacer is set up to clear all the containers above it and start on a fresh clean row, so to speak. It uses the declaraton clear:both to set itself below all the containers above it so the new container will not overlap the old.

.spacer {
clear:both}

<div class=”spacer”>&nbsp;</div>

The &nbsp; is the extended character code to represent a space made with the spacebar. Think of the &nbsp; as a space holder within the HTML division.

.emptyspace {
clear:both; height:10px; width:50px; background:transparent}

<div class=”emptyspace”>&nbsp;</div>

Consistent white space should be set up within the style rules for the container divisions through the use of margins and padding.

Our Web Page Design Blockquotes

When we create a pull-quote, a quote highlighted away from the text, we want it to have some character and pizzazz. So we created open and closed graphic quotes and changed the text to be larger, dark blue, and feature the source of the quote in small, italic letters.

This is our blockquote. Notice the alt declaration in the image selector. It is blank. This is because the quote graphics aren’t important to someone blind. The blockquote will be read as a quote without needing the graphic inferences.
Lorelle VanFossen, Web Designer and Braggart Extraordinaire
blockquote {
display:block; position:relative; color:blue; font-style:italic; font-size:105%}

blockquote i {
color:#6633ff; font-style:normal; font-size:70%; text-align:right}

<blockquote>
<img src=”http://cameraontheroad.com/images/core/quotsml.gif” width=”31″ height=”26″ class=”alignleft” alt=””>
This is our blockquote. Notice the alt declaration in the image selector. It is blank. This is because the quote graphics aren’t important to someone blind. The blockquote will be read as a quote without needing the graphic inferences.<br>
<i>Lorelle VanFossen, Web Designer and Braggart Extraordinaire</i>
<img src=”http://cameraontheroad.com/images/core/quotsmr.gif” width=”31″ height=”26″ align=”top” alt=””>
</blockquote>

CSS Blockquotes – Links and Resources

Floats With Text and Images

In the “old days”, just a few years ago, when you wanted a graphic to sit on the right size of the screen, you would include a declaration within the img code that would state align="right" to move the graphic over and the text would wrap around. Align has been replaced by float. Therefore we needed a class selector to align the images within the document. We also needed to replace the align structure for text that we want center, left, or right with the text-align declaration. (Note: We used a shorthand combination of two classes in this example. You can find more about this in our section on CSS shortcuts and shorthand.)

.right {
float:right}

<p> <div class=”right red” style=”width:50%”>The interesting thing about floats vs text-align is that a right float moves the entire container, like this paragraph, over to the right side of the screen within its parent container, allowing the content to flow around it. But the text is still left justified. </div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quam tortor, pulvinar ut, luctus vel, vestibulum id, wisi. Maecenas molestie sollicitudin velit. Duis bibendum elit vitae dui. Fusce feugiat, nunc quis euismod rutrum, neque mauris luctus tortor, ut tempus tortor orci quis mauris. Vestibulum sollicitudin pede vitae erat. Aenean purus velit, posuere non, auctor ut, hendrerit laoreet, wisi. Aliquam erat volutpat. Maecenas tempor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut pede quam, tincidunt in, scelerisque id, gravida eget, mauris. Vivamus eleifend hendrerit diam. Aenean sagittis, sapien in pellentesque dapibus, justo erat semper augue, porta condimentum lectus purus in justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque gravida neque sollicitudin lorem vulputate gravida. Praesent sollicitudin elementum elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>

The interesting thing about floats vs text-align is that a right float moves the entire container, like this paragraph, over to the right side of the screen within its parent container, allowing the content to flow around it. But the text is still left justified.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quam tortor, pulvinar ut, luctus vel, vestibulum id, wisi. Maecenas molestie sollicitudin velit. Duis bibendum elit vitae dui. Fusce feugiat, nunc quis euismod rutrum, neque mauris luctus tortor, ut tempus tortor orci quis mauris. Vestibulum sollicitudin pede vitae erat. Aenean purus velit, posuere non, auctor ut, hendrerit laoreet, wisi. Aliquam erat volutpat. Maecenas tempor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut pede quam, tincidunt in, scelerisque id, gravida eget, mauris. Vivamus eleifend hendrerit diam. Aenean sagittis, sapien in pellentesque dapibus, justo erat semper augue, porta condimentum lectus purus in justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque gravida neque sollicitudin lorem vulputate gravida. Praesent sollicitudin elementum elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.


The float left does the same thing as the right float but puts the content on the left side of the page.

.left {
float:left}
The interesting thing about floats vs text-align is that a right float moves the entire container, like this paragraph, over to the right side of the screen within its parent container, allowing the content to flow around it. But the text is still left justified.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi quam tortor, pulvinar ut, luctus vel, vestibulum id, wisi. Maecenas molestie sollicitudin velit. Duis bibendum elit vitae dui. Fusce feugiat, nunc quis euismod rutrum, neque mauris luctus tortor, ut tempus tortor orci quis mauris. Vestibulum sollicitudin pede vitae erat. Aenean purus velit, posuere non, auctor ut, hendrerit laoreet, wisi. Aliquam erat volutpat. Maecenas tempor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Ut pede quam, tincidunt in, scelerisque id, gravida eget, mauris. Vivamus eleifend hendrerit diam. Aenean sagittis, sapien in pellentesque dapibus, justo erat semper augue, porta condimentum lectus purus in justo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Quisque gravida neque sollicitudin lorem vulputate gravida. Praesent sollicitudin elementum elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.


.center {
text-align:center}

<p class=”center”>With a center text-alignment, we are no longer working with floats but actually forcing the text to line up down the center with ragged edges on the right and left. As this is not a float but a text alignment, text doesn’t flow around this container any more.</p>

With a center text-alignment, we are no longer working with floats but actually forcing the text to line up down the center with ragged edges on the right and left. As this is not a float but a text alignment, text doesn’t flow around this container any more.


.righttext {
text-align:right}

<p class=”righttext”>With text-align set to right, the text in this paragraph is now right justified with a ragged left edge.</p>

With text-align set to right, the text in this paragraph is now right justified with a ragged left edge. If you don’t see the justification, narrow the width of the page you are viewing.


.lefttext {
text-align:left}

<p class=”lefttext”>With text-align set to left, we are back where we started and the paragraph text is now left justified with a ragged right edge.</p>

With text-align set to left, we are back where we started and the paragraph text is now left justified with a ragged right edge.

Floats With Images

The same technique can be used with images. Here is an example of the same text with an image floated to the left.

<img src=”http://cameraontheroad.com/photos/mammals/foxcloseup.jpg” class=”alignleft” width=”204″ height=”302″ alt=”Red fox in snow, photograph by Brent VanFossen”>

Red fox in snow, photograph by Brent VanFossenBy placing a class statement that floats the graphic to the left or right, the align element is now gone from the image tag and replaced by class="alignleft" which floats the graphic within the container to the right or left of the container. Using a float declaration, graphics can be placed to move within the container they reside, like this paragraph, for instance, instead of being separate from their container. The more the graphic stays with the content, the better the graphic relates to the content.

Now, notice how we’ve started another paragraph and the photograph of the fox continues to be wrapped around by the text, even though this new paragraph is its own separate container. Floats literally “float” within the content so the content will move around it with the flow of the document, dependent upon other layout charactertics such as column or page width, and the width of the screen or monitor in which the browser window resides. Narrow this window and the content will continue to flow around the photograph. The top of the photograph stays with the paragraph in which the img tag resides, but all the content flows around it.

CSS Floats – Links and Resources

Fixing Browsers: Bugs and Hacks

Example of a Microsoft Internet Explorer bug that causes boxes to overlap list bullets. While the CSS and HTML web standards are in place, they are still a growing and evolving entity. As Internet browsers get more advanced, the codes change with them. Before standards became the norm, a designer would have to design their web pages to accommodate all the different browsers out there and the different ways they handle code. Today, a few designers are still designing for older browsers, but most people have gotten the clue and updated their Internet software. Still, even today’s browsers have some bugs and here are some fixes to deal with the ones in Microsoft Internet Explorer, the most common Internet browser in the world.

Internet Explorer computes the margins and padding differently than other browsers and the web standards convention. This results in a bug involving text, boxes, lists, and images. In the graphic example to the right, notice how the box overlaps the list bullets on the right side. Tom Gilder’s Internet Explorer Bugs page has a good example of how these bugs work. Other bugs include one where the content will be invisible on the page until you scroll down the page and then it magically appears and disappears. Sometimes images and containers will appear to be jumping around. The links below can give you the best fixes for these bugs, but these are ours:

/* Boxes */
html > body .boxleft {
margin-left:12px}

html > body .boxright {
margin-right:12px}

html > body .boxtip {
margin-right:12px}

html > body .boxquote {
margin-right:12px}

html > body .boxblue {
margin-right:12px}

img.left {
margin:1% 2% 1% 0; border:0}

img.right {
margin:1% 0 1% 2%; border:0}

To ensure fewer bug problems, make sure that every container element has a display and position declaration. Most of our selectors feature display:block and position:relative to insure that the blocks of content are grouped together and their positions are not absolute but relative to the flow of the page’s structure.

Links for Information on Bugs

Directional Ploys

International users of the Internet and Web are increasing at rates faster than the US, Canada, and Europe. As more international users come on, the need to pay attention to the impact your page will have on foreign computers and Internet browsers, especially ones with right-to-left languages, the more you need to pay attention to the international standards for web compliance.

Because we live in Israel, we have a lot of web page users who have Hebrew-enabled operating systems, usually Windows 98 though some are slowly changing to WinXP and Linux. Their Internet browsers tend to be old and their operating system forces the software to produce right-to-left content to support right-to-left languages such as Hebrew and Arabic. This tends to override all web coding, but you can throw some code into the mix to help override their directional preference. This works on the newer versions of browsers and is ignored by the older versions. For those, the page ends up with right aligned text and graphics going all over the place. Keeping your browser and operating system updated and the HTML layout as simple as possible, as we have, overcomes those display problems since the oldest browsers won’t recognize the display elements and will produce the page content linear to the code presentation.

Having the right doctype makes a huge difference, too, but many older browsers don’t recognize doctype so this bidirectionality code, such as the below block-level code to influence browsers like Internet Explorer versions 4 and under, will help you enforce the direction of your layout.

Start by stating the direction preference in the appropriate doctype to your web page and then in your HTML and BODY tags:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>

<html dir=”ltr” lang=”en-US”>

Here are a few of the English language codes for other versions of English.

  • English – lang=”en”
  • English US – lang=”en-US”
  • English Great Britain – lang=”en-GB”
  • English Cockney – “en-cockney”
  • English Scouse – lang=”en-scouse”
  • English Australia – lang=”en-AU”
  • English Canada – lang=”en-CA”

In your style sheet, add the following direction declaration in your HTML and BODY selectors and the bidirectional code below to help align your content appropriately. It’s a bit overkill, but until this problem is easily solved, exagerated code ensures a proper layout when challenged by a foreign language.

html, body {
direction:ltr}

/* begin bidirectionality */
bdo[dir=ltr] {
direction:ltr; unicode-bidi:bidi-override}

bdo[dir=rtl] {
direction:rtl; unicode-bidi:bidi-override}

*[dir=ltr] {
direction:ltr; unicode-bidi:embed}

*[dir=rtl] {
direction:rtl; unicode-bidi:embed}

/* block-level in msie4 */
address, blockquote, body, dd, div, dl, dt, fieldset,
form, frame, frameset, h1, h2, h3, h4, h5, h6, iframe,
noscript, noframes, object, ol, p, ul, applet, center,
dir, hr, menu, pre, li, table, tr, thead, tbody, tfoot,
col, colgroup, td, th, caption

{
unicode-bidi:embed}

Bidirecctionality – Links and Resources

Revealed – Our CSS Media Styles

Part of the work involved in creating an “accessible” website includes developing Cascading Style Sheet (CSS) media references to help different media types, such as handheld computers, web page readers, and printers, handle our web page design elements.

Below are some resources to get you familiar with how CSS media references work, and then we give you specific examples of how we use them in our web pages and web page design.

CSS Media Types – Links and Resources

Web Pages Going to Print

Web page designers spend so much time designing for the screen, they often forget that people still want to print them out and read them on a piece of paper. People just can’t seem to break the paper habit. So designers need to take a few minutes to think about how they want their beautiful web page design to print.

Deciding how your web page design will print means examining all the graphic elements and deciding which ones are critical to the printed presentation, and which ones will look wierd or interfere with the reader’s ability to read the page.

We decided that our sidebar, since it mainly featured links to other pages within our site, a diffcult thing to click on a piece of paper, wasn’t important to the final printed product, so we choose to eliminate it with a display: none in our print media style sheet. Other elements that didn’t need to be “read” on paper were our advertising and our bottom divisions.

Then we made a few design changes so the web page would print nicely, allowing for easy reading. We changed our links so they would have an underline and be boldly represented. We also increased the size of our header text since it is small on the screen, enhanced by a large background image of our logo, so it can be large and easily read when printed. We also changed the height of the header from 100px to 30px. Why waste paper on white space?

One of the most challenging aspects of designing web pages for printing is the way a printer handles a graphic image from a web page. If the image is close to the bottom margin, the printer may just cut the image in half or even more instead of moving the image above or below the physical page break. It can do the same thing with headings, blockquotes, tables, and lists. Not all browsers recognize the declarations for page-break-before, page-break-after, and page-break-inside, though more are adding it to their software. What these declarations do is command the browser to recognize a page break before or after the specific tag and respond according to the declaration’s instructions. For example, we don’t want our headings separated from our text, so we’ve set the page-break-after and the page-break-inside to avoid. This should tell the browser to avoid making a break between the heading and its text. It doesn’t work for every browser, but we leave it in with hope.

To see how our web pages will print, with and without printing a page, select from the browser menu FILE, PRINT PREVIEW. This will allow you to “see” the page before it is printed to see the changes in the design in preparation for printing.

@media print {

body {
background: white; font-size: 10pt; margin: 0}

#sidebar {
display: none}

#bottom {
display: none}

#header {
height: 30px}

#header p {
font-size: 120%}

#content {
margin-left: 0; float: none; width: auto}

.ad {
display: none}

#content a {
font-weight: bold; color: #000066; text-decoration: underline}

h1, h2, h3, h4, h5, h6 {
page-break-after: avoid; page-break-inside: avoid}

blockquote, table, pre {
page-break-inside: avoid}

ul, ol, dl {
page-break-before: avoid}

img {
page-break-inside: avoid; page-break-after: avoid; float: none}

}

CSS Print Media

CSS and Handheld Computer Media

The category of handheld computers aren’t limited to PDA (Personal Device Assistant) computers. These can include many of the new cell phones with built-in web browsing capabilities. Handheld media takes your computer screen designed web page and squishes it down to the tiny screen.

Currently, there are few standards for handheld media style sheets because the web browsing software and hardware on handheld computers isn’t very stable. It is still an evolving market. In the early days, the handheld computers had little memory and even less processing power so they couldn’t handle much in the way of graphics. Today they are packing the power and speed into these little computers and their ability to handle graphics and web page designs are ever increasing.

If you design your HTML and CSS for total accessibility, with the ability to be easily read by screen readers, Linux-style web browsers, and without stylesheets, then you are already a step ahead on designing for the small screen.

Designing for screen sizes of 160×160 small to the larger 320×480 “stretch displays isn’t easy. Should the design “shrinkage” be the responsiblity of the PDA software or of the web page designer? Well, it’s a little of both. Handheld computers are moving fast into the realm of laptop quality, but they are still lagging. So the web page designer has to help them along a little.

In considering our handheld media responsiblities in our style sheet, we choose to let some design elements go. We removed the sidebar with a display: none and soon the advertising joined them. With the sidebar gone, we changed the alignment on the footer back to the left so it wouldn’t be shoved off the screen to the right. We reduced the margins on our content container to zero so as much as possible would fit into the tiny screen. The rest, because of our web standards compliance design, can literally take care of itself. We have some test examples of what our web page may look like on different computers and handheld media, as well as how other specialized software would view our page.

@media handheld {

body {
background: center center; background-position: 45% 55%}

#sidebar {
display: none}

#content {
margin: 0}

#footer {
text-align: left}

.ad {
display: none}

}

The style codes for the handheld media could go into our main style sheet, but we choose to have it be separate in its own style sheet. Some browsers only load the appropriate style sheet as it is needed, so having it separate allows everything else to load faster. We grouped our print, handheld and aural medias together. The link in our HTML header is:

<link rel=”stylesheet” type=”text/css” href=”../style/print.css” media=”print, handheld, aural”>

Handhelds, Cell Phones, and Small Screens – Links and Resources

The Hills Are Alive With the Sound of…
Our Web Page Talking?

Yes, our web page talks. Doesn’t yours? Well, everyone’s web page should talk and it should speak well for them.

Actually, our web page does talk. It doesn’t use Cyberbuddy or Microsoft Agent to talk to you, but it is also designed to accomodate those web page users who depend upon web page readers to “hear” web pages.

We stuck to a standard aural media with a man reading the page. I’d like to have it be a woman, but none of the women’s voices we “heard” sounded nice at all, so we stuck with good ole Paul to be our reading voice.

The changes we made to the aural media file were very minor. Since we rely heavily upon our H3 heading, we increased the pitch-range from 70 to 80 to add accent to that heading, and lowered the H2 heading pitch-range to 70 to make a difference in tone. We also added our invisible class to the aural media and set it to display: none in the hopes that this would further help to ignore the content set to invisible since it is boring and unintelligable php code.

There are a variety of “voice” style designs available on the web and we’ve included some links and resources below to help you design your own talking web page.

@media aural {

h1, h2, h3, h4, h5, h6 {
voice-family: paul, male; stress: 20; richness: 90}

h1 {
pitch: x-low; pitch-range: 90}

h2 {
pitch: x-low; pitch-range: 70}

h3 {
pitch: low; pitch-range: 80}

h4 {
pitch: medium; pitch-range: 60}

h5 {
pitch: medium; pitch-range: 50}

h6 {
pitch: medium; pitch-range: 40}

li, dt, dd {
pitch: medium; richness: 60}

dt {
stress: 80}

pre, code, tt {
pitch: medium; pitch-range: 0; stress: 0; richness: 80}

em {
pitch: medium; pitch-range: 60; stress: 60; richness: 50}

strong {
pitch: medium; pitch-range: 60; stress: 90; richness: 90}

dfn {
pitch: high; pitch-range: 60; stress: 60}

s, strike {
richness: 0}

i {
pitch: medium; pitch-range: 60; stress: 60; richness: 50}

b {
pitch: medium; pitch-range: 60; stress: 90; richness: 90}

u {
richness: 0}

a: link {
voice-family: harry, male}

a: visited {
voice-family: betty, female}

a: active {
voice-family: betty, female; pitch-range: 80; pitch: x-high}

.invisible {
display: none}

}

Access – Speech