Summary of eHow Articles for January

A list of the thrilling and educational how to articles I wrote at eHow this month. And tulips! More . . .

Yellow Tulips

One of the gifts I received for Christmas was a jar with three tulip bulbs in water. They were sprouting by January and bloomed in a few days. This is the first day they opened, eventually all three bloomed. In addition to watching the flowers grow this January, I wrote these articles at eHow.

What’s Hot?

What’s popular here and what’s popular right now at eHow? Here’s the lucky seven top links from both sites.

What’s popular here and what’s popular right now at eHow? It’s the big seven! First, the big traffic pullers on Web Teacher are:

And what is drawing interest on eHow these last few days? Those articles are:

Adapting Dreamweaver CSS layouts to display:table rules

With the upcoming release of IE8, which will support CSS display:table and other table related display properties, I’m expecting changes in the way web pages are laid out. I just finished an intensive experience with Adobe Dreamweaver CS4 and the built-in CSS layouts that come prepackaged with the product. Naturally, my mind veered in the direction of those layouts. Okay, the truth. Actually, I’ve been having visions of Stephanie Sullivan (who created the Dreamweaver CS4 built-in CSS layouts) madly adapting all those page layouts to add display:table layout options.

Well, I couldn’t wait for the next release of Dreamweaver to see what Steph might do (or might not do—this is only my fantasy—no idea if Steph is participating) to add to the layouts she’s already made for Adobe. I had to play around with it myself.

I started off easy. I picked a layout with two columns, no header and footer, and a fixed width. In the Dreamweaver File > New menu, this layout is called 2 column fixed, left sidebar. I got just a bit fancy by adding a div in the main content area that held two boxes or cells that use display:table-cell in the CSS. There are colors and widths and other CSS rules from the Dreamweaver layout that I didn’t touch. I only removed the rules for layout and added new ones. Here’s the CSS for the layout:

#sidebar1 {
display: table-cell;
width: 200px;
background: #EBEBEB;
padding: 15px 10px 15px 20px;
}
#mainContent {
display: table-cell;
padding-left: 8px;
}
.cell {
display:table-cell;
width:400px;
height:100px;
border:1px solid red;
}

Here’s how it looks. If you click the image, you’ll see the actual HTML page, which contains the CSS and comments that explain what I changed and did. Don’t expect the layout to look right with IE unless you have version 8. Use Firefox or Opera or Safari. Of course, you can view the source with IE6/7 to see the HTML and CSS.

layout using display:table properties

The changes were super easy. Took no more than 5 or 10 minutes to do.

I tried something harder. This time I used the Dreamweaver File > New layout for CSS called thrColLiqHrd, which means a three column liquid layout with a header and a footer. You are probably aware that this type of layout is normally done with floats (which must be cleared). Sometimes this type layout also needs faux columns to get equal heights on the three columns.

In the HTML, I changed the source order for the three columns to sidebar1, mainContent, sidebar2. I added a wrapper called contentwrap around the three columns. This enabled me to display the three columns using display:table-row. Similarly, the header and footer were designated as display:table-row. The last change was to set each column to display: table-cell. As with the first adaptation, I left colors and widths and other rules from the built-in Dreamweaver layout the same. I only changed rules affecting the layout. Here’s the CSS for the layout.

#container {
display: table;
width: 80%;
background: #FFFFFF;
margin: 0 auto;
border: 1px solid #000000;
text-align: left;
}
#header {
display:table-row;
background: #DDDDDD;
padding: 0 10px;
}
#contentwrap {
display:table;
}
#sidebar1 {
display: table-cell;
width: 22%;
background: #EBEBEB;
padding: 15px 0;
}
#sidebar2 {
display: table-cell;
width: 23%;
background: #EBEBEB;
padding: 15px 0;
}
#mainContent {
display: table-cell;
}
#footer {
display: table-row;
padding: 0 10px;
background:#DDDDDD;
}

And here’s the result. If you click the image, you’ll see the actual HTML page, which contains the CSS and comments that explain what I changed and did.

three column layout with display:table rules

This layout took longer to adapt, maybe 20 to 30 minutes. Plus, I made a few return trips to the book Everything You Know About CSS is Wrong! to make sure I knew what I was doing.

Even when IE8 releases, using layouts like these without conditional comments linking to IE7 CSS rules won’t truly be practical until all the older installations of IE have disappeared. For a while it will be like the bad old days when everyone used @import to create a stylesheet just for Netscape. Except, now we’ll use conditional comments to accomodate older versions of IE. We’re still dealing with the pain of creating extra stylesheets for browsers that don’t perform up to standards. Same old, same old. Sigh.

Yet. Yet. People will start playing with this more fully when IE8 releases. Here’s my advice to Dreamweaver users who are eager to start experimenting with layouts using display:table properties. You don’t need to wait for the next release from Adobe to create some pages using CSS table layouts. Try adapting the layouts you have. It works.

Related posts: CSS Tables, Review: Everything You Know About CSS is Wrong!, Mastering CSS with Dreamweaver CS3

Adobe Dreamweaver CS4 Classroom in a Book

get this book at AmazonAdobe Dreamweaver CS4 Classroom in a Book is now available.

This book is officially the product of the Adobe Creative Team, which includes quite a number of people including several editors and other people at both Adobe and Peachpit Press. For this edition of the book, I wrote some new lessons and revised some of the previous lessons. I was under the impression that my name would not be mentioned in the book. So I was pleasantly surprised to see my name in small print on the copyright page as writer.

If you are a Dreamweaver beginner, or want to learn about the latest features in this version of Dreamweaver, consider using this book as your guide. It’s my longest ever Web Teacher Tip.

Useful Links: AEGIS, CSS Tables, Validation Report, the state of education

AEGIS (Accessibility Everywhere: Groundwork, Infrastructure, Standards) is a new group focused on accessibility in Europe. On Peter Korn’s blog, he explains,

Today I am more than pleased to share with you news of the AEGIS project, a €12.6m investment in accessibility, with the vast majority of it focused on open source solutions.  It is a major research and development investment in building accessibility into future mainstream Information & Communication Technologies.

Everything you know about CSS is wrong at Digital Web Magazine explains what you will be able to (finally) do with the CSS display:table property when IE8 is released. The article introduces a book by the same name by Rachel Andrew and Kevin Yank from Sitepoint. I’m trying to figure out how to get a copy so I can review it here.

MAMA: Markup validation report: Opera did a study on web standards adoption. The results clearly show the need for a change in the way we teach.

As part of MAMA’s overall analysis process, it ran every URL in its database through the W3C’s markup validator. MAMA was able to validate 3,509,180 URLs in 3,011,661 domains, and only 4.13% of the URL set passed validation (with 4.33% of the domains having at least 1 URL that passed validation).

This is a huge study, there’s lots more information to sift through; please check it out on your own. I remind you that Opera published a standards-based curriculum and the Web Standards Project will soon make public its months of effort in creating a standards-based curriculum. The WaSP curriculum should be publicly available in March 09. If teachers don’t teach standards, students will never understand the importance or use the techniques.

One teaching area that clearly shows up in the study as needing major improvement is the way Dreamweaver is taught. Only 3.4% of sites created with Dreamweaver passed validation. With proper instruction, people can learn to use Dreamweaver to create standards-based code. It’s all in how you use the tool, which  depends on how you were taught to use it. Here’s an old (but still valid) presentation of mine on this topic: Achieve Accessibility with Dreamweaver. This book (a new CS4 version will be out soon) does it right: Mastering CSS with Dreamweaver CS3. And the upcoming version of Dreamweaver CS4 Classroom in a Book will take a standards-based approach to Dreamweaver.

On the other hand, sites made with Apple iWeb passed validation with a whopping 89% success rate. Maybe we should forget about teaching with Dreamweaver and move en masse to iWeb.

Summary of eHow articles for October

Hot Air Balloons

Ah, October, that sweet time of year when the mornings are cool and the afternoons are warm, when the New Mexico skies are filled with bobbing color and the mass ascension at the Balloon Fiesta is more than enough reason to rise at 4:30 AM. But not before writing something for eHow: