Better the second time around

What’s hot here on Web Teacher?

What about some of the other stuff that I write? A couple of items published as the TGB Elder Geek are worth a second look.

At eHow, these articles are getting some attention.

At BlogHer, these articles are hot.

Make Rounded Corners with CSS3

There’s a new version of Cascading Style Sheets (CSS) in the works—CSS3. With this new set of rules for styling your blogs and web pages, you can do things that previously could only be done with images.

One bit of magic that you can do with a CSS style rule now is make rounded corners. You can apply rounded corners to borders, fieldsets, or anything that has a border line around it.

Everything on a web page is in a box. Every paragraph, heading or image you stick on a web page is bounded by a box. Usually you aren’t aware of the box, because you don’t see the borders—the boundaries of the box are not visible. If you put borders on the box, the edges of the box are made visible. Borders frame the element on the page and help separate one sort of content from another. The default borders create square cornered rectangles.

I’ve used rounded corners in several places on this blog. Here’s a specific example. I have a slideshow from Flickr in my sidebar. I put a border around the heading and the slideshow to separate that particular bit of content on my page into a unique element. I made the border have rounded corners.

The Rounded Corner How To

Find the relevant rule in your stylesheet. Every part of your page probably already has some style rules in place. If there’s already a border rule, change it. If it doesn’t have a border rule yet, add it. Here’s what I did in the part of my stylesheet where I styled the slideshow:

#womenintechslides {
border: solid 1px #3CF;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
}

I’ll explain the rule. I added the slideshow to my HTML page using a div with the ID “womenintechslides.” The rule styles that div. First I set the border itself. I made it solid. I made it 1px in width. I made it an aqua color represented by the code #3CF. That much alone would add a border, but the border would have square corners.

The CSS3 property that rounds corners is border-radius. For that property, give a value in pixels to set how curved you want the corner to be. If you go beyond about 18px for the radius, it starts to look bad (pixelated), but try various numbers to find what you like.

CSS3 isn’t set in stone yet. The various browsers are adopting bits of it at different rates. You have to add a couple of redundant border-radius declarations aimed at different browsers, at least for now. The -webkit-border-radius declaration is meant for webkit browsers like Safari and Chrome. The -moz-border-radius one is for mozilla browsers like Firefox. If you put the standards rule—border-radius—last, it will be the one used when all browsers finally get CSS3 implemented using the same rules. By that time, you’ll only need the border-radius rule and the others can be dropped.

That’s the whole magic trick: border-radius. Go round something off.

Now Available! InterACT with Web Standards: A Holistic Approach to Web Design

InterACT with Web Standards coverInterACT with Web Standards: a Holistic Approach to Web Design is available today.

This announcement is a BIG DEAL.

This book puts everything you need to teach a class in web design or development with web standards into your hands. The book is easy to use in connection with InterACT’s 17 courses in 6 learning tracks making it the perfect tool and resource for teaching or learning contemporary web design best practices.

If you are a student who wants to learn about building a web site with web standards, this book will lead you there.

For educators, your semester will be a snap to plan with this book. It’s all right there for you.

The book is published by New Riders (2010). There are 10 authors. The major contributor being Chris Mills, with additional expertise from Erin Anderson, Virginia DeBolt, Derek Featherstone, Lars Gunther, Denise Jacobs, Leslie-Jensen-Inman, Christopher Schmitt, Glenda Sims and Aarron Walter. I’m really proud to have been a small part of making the book a reality, because I think the book is going to be very important to students and teachers who are looking for the a reliable resource for web design best practices.

In addition to the writers, a number of other people worked to bring this book to life. They include Aarron Walter as project manager, Patrick Lauke as technical editor, Jeff Riley as development editor, Leslie Jensen-Inman as creative director and Jessi Taylor as book and site designer.

Many kudos go to Leslie Jensen-Inman and Jessi Taylor. When you see this book and hold it in your hands you will realize what a work of art it is from a design and typography point of view. It’s a beautiful book.

Take a look at the table of contents:

  1. InterACT
  2. Tools
  3. Learning on the Web
  4. Internet Fundamentals
  5. Writing for the Web
  6. Information Architecture Intro
  7. Site Planning
  8. Content Analysis
  9. Content Strategy
  10. HTML Intro
  11. CSS Intro
  12. <head>
  13. Headings and Paragraphs
  14. Whitespace
  15. Links
  16. Images
  17. Lists
  18. Tables
  19. Forms
  20. Floats
  21. Positioning
  22. Accessibility Intro
  23. Accessibility Helps
  24. Accessibility Testing
  25. Bringing it All Together
  26. Index

The InterACT with Web Standards book site has everything you need to know. There, you’ll find links to purchase the book, links to code examples from the book, links to bonus content, and links to the sample project. The site has links to information about InterACT, OWEA, and the Web Standards Project. You can take a peek inside the book, read some reviews, grab links to all the resources cited in the book, and MUCH MORE.

Buy now and take advantage of this limited time offer tweeted by @waspinteract.

InterACT With Web Standards, the first book from The Web Standards Project, is out. Save 35% on it with code INTERACT. http://cot.ag/9RS4rEMon May 17 16:00:20 via CoTweet

Useful links: Funny stuff, press Enter, VoiceOver

Need a laugh? How to Successfully Educate Your Clients on Web Development at Smashing Magazine is really funny.

Who moved my Enter key? from Know IT describes the role muscle memory plays in keyboarding. Personally, I’m still waiting for Mac and Windows to agree on the location and function of the Ctrl/Cmd keys. Moving from Mac to Windows and back again is like getting into a car and discovering that the brake and gas pedal are reversed in this particular model. Once you get it working, you go back to the other car and have to learn it all over again.

iPhone VoiceOver Features for People with Disabilities is an informative video describing the iPhone VoiceOver accessibility features.

Tip: Adding borders to data tables with CSS

How do you add borders to data tables with CSS? Depending on how you want the borders to display, it can normally be accomplished with three steps.

I constructed a small table and will show it to you as I move through the three steps. I’ll use a medium width, solid style border in the color #00f (blue) for all the border rules. With a width assigned to the entire table, and a border rule added to the table, here’s the beginning CSS.

table {
width: 40em;
border: medium solid #00F;
}

Here’s how that looks (in Firefox).

table with CSS borders appled to table selector

As you can see, applying a border rule to the table selector adds a border to the table only. Step two is to apply the border property to the td and th selectors as well. Here’s the new CSS.

table {
width: 40em;
border: medium solid #00F;
}
th, td {
border: medium solid #00F;
}

This is what you see now.

a table with borders applied to the td and th selectors

You may choose to accept this appearance. But you see that you have some spacing between the table cells between the borders of each data cell. If you don’t like that appearance, the third step will correct it. This step involves the border-collapse property. It is applied to the table selector, like this:

table {
width: 40em;
border: medium solid #00F;
border-collapse:collapse;
}
th, td {
border: medium solid #00F;
}

This rule eliminates the space between cells, but is implemented in a slightly different way in some browsers. Look at the effect in Firefox and Safari.

rendering of border-collapse: collapse in Firefox
Rendering of border-collapse: collapse in Firefox
Rendering of border-collapse: collapse in Safari
Rendering of border-collapse: collapse in Safari

To my eye, there is a thicker border on the top and left in Firefox. (Before you decide that’s unacceptable and write rules to correct it, it would be good to see how other major browsers render the border.)

You can change the border style or width or color, but these three simple steps take care of getting a data table presented with borders.

Tip: HTML5 markup for blog posts

Writing about HTML5 while it is still in a state of flux is like standing upright on a water bed while shooting a carnival rifle at a moving row of ducks. What I’m about to tell you is based on the HTML 5 working draft dated 4 March 2010.

In HTML5 terms, the <article> element is considered sectioning content, as is the <section> element. Authors are encouraged to use the article element instead of the section element when it would make sense to syndicate the contents of the element. A blog post, therefore, makes the most semantic sense to me when it is marked up as an <article> element. It can be syndicated as a unit.

An <article> element can include a <header> element, which could contain  <h1> through <h6> elements marking up things like the article title, author’s name, publication dates, and other material that makes sense. Within a <header> element, you can nest an optional <hgroup> element, which is header group, or a related group of elements within a <header>. In HTML5, each <article> can have its own <header>.

An <article> element can include a <footer> element. The <footer> could contain links to comments, various permalinks, options to share the post on Twitter or Facebook or StumbleUpon, an hCard, or other material relevant to the article content. In HTML5, each <article> can have its own <footer>.

Based on that background information, here’s sample markup for one way to format a blog post with HTML5. I suggest a few ways to add content, but there are many more ways to deal with this. For example, you might want the pubdate in the footer.

<article>
<header>
<a href="#" rel="bookmark" title="post title"><h1>Article title</h1></a>
<h2>Author's name</h2>
<p>Published <time pubdate datetime="2010-03-26T18:26-07:00"></time>.</p>
</header>
<p>A lot of great article content.</p>
<footer>
Footer info here: comment links, whatever.
</footer>
</article>

Useful links: High Ed Websites, Knowbility, SXSW podcasts

Showcase of Academic and Higher Education Websites at Smashing Magazine lets you see quite a few academic sites that pass Smashing’s standards as being well designed.

The Knowbility Crew

These fine folks, with Knowbility Executive Director Sharron Rush at the top left, are the Knowbility crew who managed the Knowbility booth during the Trade Show at SXSWi. The Accessible Insights Blog from Knowbility recently moved, so check them out in their new home.

In an astonishing feat of speed, SXSW is already making podcasts of some of the main events such as keynotes available. See SXSW Interactive Videos and Podcasts.