Oh, I got hot sause all over my bazito!

You know what this is? It's a brain sucker. You know what it's doing? Filing its tax return

If you wish to make an apple pie from scratch, you must first invent apple pie

The Adventures of Little Ed Brave

Tell airport security your name is McCannister because you can hide anything in a cannister.

You know what? Nobody notices when this changes anyway.

There are 10 types of people in the world: Those who understand binary, and STFU

What happens in a black hole stays in a black hole

The black hole draws you inexorably inward. Time slows. You are likely to be eaten by a grue.

I'd diddle little umdidlie... if she weren't my half-sister.

Abortion prevents pedophilia. In more ways than one!
Get Firefox!
I wrote a haiku

which I was about to share,

but then I thought, "screw it."
Level 1

Notice to all users of the Holodeck:

There are safety protocols in place that cannot be deactivated without the approval of two commanding officers or the captain to protect users of the Holodeck from potential harm. However, every time the Holodeck is ever used in a nontrivial manner, no matter what the safety protocols say, the Holodeck turns into a deathtrap.

Unless you believe yourself to be adept at constructing a forcefield from your communicator and 19th century Earth tools, or you're at the very least not wearing a red shirt, you are strongly advised not to attempt to use the Holodeck until a designer comes up with a safety protocol that doesn't kill you whenever somebody looks at it funny. Even when you're not on the holodeck. Or in the same quadrant. Or time period.

In fact, if you are wearing a red shirt, Starfleet may not be the job for you

« The North Wind and the SunGorilla Hunting »

Gray on gray: The new hidden text

Permalink 04/14/08 at 07:31:40 pm, by Ed, 347 words   English (US)
Categories: General

I finally got around to formatting the rest of my website to not have illegible text due to the background color of the body element. It used to be such that I had a dark gray background in the body (which I still do), with the text of the other webpages printed on that directly, in a snow-white color and links at the same color as normal, which rendered nearly the same as the gray.

If you'll take a look now, you'll see that I've put the same lighter-gray background in the content of the other pages, and returned the foreground color to standard black. This lighter gray also allows for legibility on links (though hovering is still a problem).

The interesting thing to say is how I achieved it. The way it should have been done was by going through each page and adding an ID to the TD that stored all the information. (Yes, I'm using a table to lay out my website. I'm just as sad as you are. At least it's just a single row with two to three columns). After that, the stylesheet could directly specify the style for that particular table cell, adding the border, changing the color, etc.

Instead, what I did was assume that all of the pages were laid out the same (which they are) and selected the first table cell after any other table cell inside any table row element in any table body of any table directly inside any body of the document and styled that instead. Specifically, I used the CSS selector:


Essentially, this selects the second table cell (td element -- the main content) because it's the first one directly after the first table cell in the tbody (the column on the left) because it's easier than going through each file separately and finding that td and adding an "id='content'" attribute to it. Srsly. Admittedly, this is not what CSS is for, as it is extremely dependent upon and unportable to other layouts.

No feedback yet

Comments are closed for this post.