Category: CSS

CSS: table-layout:fixed keeps Netscape 7 in line

Netscape 7 was squashing some table cells down, ignoring widths I had specified in the css.

The code for the table:

Continue reading

CSS Border-top does not show in empty cells

In IE, borders created by styling a table cell with “border-top” attribute do not show up when used on a td tag, unless there is some content inside the cell, at least a non-breaking space. This is not the case in other browsers – the border will show up even when the cell is blank.

In the example below, there is a single table, with three columns and three rows, but only the first 2 rows contain anything. The last row is completely empty. The tag “td” has been styled with


border-top-width: 2px;
border-top-style: solid;
border-top-color: #003399;

Continue reading

A Trivia Game built with Questionmark Perception Part I

I. JCAHO Trivia – Background, objectives, and game play


(click to enlarge image)

In June, as a small part of a larger hospital staff training project, I built an educational online game for the nursing department. There were several requirements that helped determine the shape of the final result.

Synchronous game play vs. Asynchronous: When considering what kind of game might be best for our purposes, we first considered one based on Jeopardy, since that format is so popular.

However, Jeopardy is not an asynchronous system. In other words, each Jeopardy round is a timed competition against several other players, all of whom must be playing simultaneously or “synchronously” as the elearning people call it.

Continue reading

Setting height in nested divs

Note to self: USE THE RIGHT DOCTYPE!

One of the first things we web developers usually do upon starting to using CSS is to try to recreate our old HTML multi- column layouts. which were invariably built with tables.

This turns out to be quite a challenge, particularly getting columns to be equal in height. In other words it’s difficult to get CSS-styled elements to act like a table.

I’ve found that many of the so-called 2 and 3-column CSS-only layouts get around the difficulty of making equal-height columns by using a background image in a container div that makes it appear as if the columns have backgrounds which are the same size. Clever, but it adds a little complexity and some inflexibility to the layout.

When I was first starting to convert my pages to CSS-based layouts, one of the methods I tried was to surround the columns with a container element which I hoped would transfer the height of the tallest div to the other one through the use of "height:auto" and "height:100%". It was a dismal failure, but I learned a few things in the process. Here’s what I tried:

Continue reading