July 02, 2009
Page last modified: 06/14/2009

Switch style:   original / newsprint / earthtone / bluze / none

blog

Using CSS to style tables

Posted: Saturday, June 13, 2009

Ok, I haven't made any tech geeky posts in a while, so I thought I'd go ahead and throw this in. If nothing else, it'll give me an easy place to find it when I forget it myself.

Even though using tables for web page layout is pretty much considered a no-no these days, we still need tables when presenting tabular data. The problem is, if you're using an XHTML strict doctype, attributes like border="1" are no longer valid mark-up. So, how do we handle tables in CSS? Here's a quick reference list to most of the common table attributes.
HTMLCSS
cellpadding="0"td { padding: 0;}
cellspacing="1"table { border-spacing: 1px; }
border="1"td { border: 1px solid #000; }
valign="top"td { vertical-align: top; }
align="right"td { text-align: right; }


So this:

<table cellpadding="5" cellspacing="0" border="1" width="600">
<tr>
<td align="center" valign="top">

Can be be written as:

<table>
<tr>
<td>

With the following CSS:

table { border-spacing: 0; width: 600px; }
td { padding: 5px; text-align: center; vertical-align: top; }


Other useful tidbits:

border-collapse (collapse|separate|inherit): When using the border property on both the table and the td, you'll get a double border between cells. Use border-collapse to compress it into a single border.

empty-cells (show|hide|inherit): Specifies whether to show empty cells or not. No more non-breaking spaces required!

Also remember that you can set top, bottom, left, and right padding to different values.

There are advantages to using CSS over the old method.

The sky is pretty much the limit when using CSS. Experiment and see what you can come up with.


Our home office finally enters the 21st century

Posted: Tuesday, May 05, 2009

A few weeks ago, a foul smell appeared in our home office. It was a bit of a stench of burning electronics, or plastic, or both. I finally traced it to the root cause, which was the power supply on Jessica's PC. It seems that the PSU died and dumped a good bit of voltage into the rest of the system. The machine had been acting a bit flaky, losing USB devices and things like that, so it was probably time to retire it anyway.

Both of our computers were getting a bit long in the tooth anyway. Hers was a P4 2.4 with a gig of ram and onboard video, and mine was an Athlon XP 3200+, also with a gig of ram, and an NVidia 6200 LE video card. The drives on both machines were ancient IDE dinosaurs, and moved about as fast as one. I used the blown PSU excuse to get new machines for both of us.

I decided that Jess would be better off with a nice Laptop that she could take with her on business trips. We looked at a bunch of really speedy (and pricey) laptops before settling on an HP G60-230 which has 3GB of ram and a 2GHz dual core processor. It also has a nice 16" display, and it came in below $600, not counting the $60 rebate. I also picked up a copy of MS Office 2007 Professional for her, so that she would have the same software at home and at work. Unfortunately, the laptop came with Vista (yuck) which has yet to officially break. It's proving to be a bit of a pain with wireless networking though. Maybe once Windows 7 is mainstream, we can upgrade the laptop and be rid of Vista.

As for my machine, I kept my excellent Cooler Master case, and only replaced what I wanted to upgrade. This consisted of an Asus P5Q Pro motherboard, an Intel (first Intel chip in around 12 years!) E8400 Core2 Duo (3GHz per core), 4MB of G.Skill DDR2 1066 ram, an NVidia GeForce 9500 GT video card (512mb), and a Corsair 650TX power supply. For storage I picked a Western Digital Caviar Black 640gb SATA hard drive. The drive has dual processors and a beefed up platter arrangement. Very nice piece of hardware!

linked image

For my OS, I stuck with Ubuntu Linux, moving to the latest release (9.04) in the 64-bit version. I also went with the EXT4 file system, which is supposed to provide a slight performance improvement over EXT3. They're really getting good at the Ubuntu setup program, as I was able to install the OS in no time at all, with no major tweaks. Not even any minor tweaks. The only things I had to tweak in fact were optional programs that I run, like conky and my desktop manager.

This new release of Ubuntu was supposed to focus on quick boot times, and I have to say, they really hit the mark. I can boot from dead cold to the desktop in around 12 seconds. This is especially amazing considering that 3 seconds are lost in the grub menu (a short countdown to give you a chance to change boot options) and another short delay before my desktop manager launches. It's unbelievably fast. I can boot my Linux machine up, shut it down, and boot it up again before my old Win2k machine would be booted the first time.

The speed of the new machine is quite impressive too. I realize that moving from what I had before to what I have now will exaggerate the experience, but it really, really is quite speedy. Firefox opens faster than it used to maximize, and the machine is not phased at all by running multiple instances of pretty much anything and everything.

This machine should last me for another 4-5 years, which was sort of the point of me building it. My needs are pretty simple, so I'd rather pick some decent parts and forget about it for a while than buy cheap stuff and have to constantly upgrade.

linked image

Pretty packed in, but runs pretty cool nonetheless (34 deg C).


Maryland Cashcam Bill Defeated by Single Vote.

Posted: Thursday, April 02, 2009

Ha Ha

I'm sure the greedy bastards will appeal now that their Cashcam bill was defeated in the MD Senate.

Here's a letter I just wrote to Gov O'Malley (who never fails to disappoint).
QUOTE
Mr Governor,

I'm a registered Democrat who lives in Montgomery County, and I voted for you last election. I plan to vote for you in the next election (assuming you decide to run), but I must say this nonsensical love affair you have for speed cameras is quickly changing my mind, as well as the minds of many of my fellow citizens.

Everyone wants safer roads, but if you honestly read some of the unbiased studies of speed cameras, especially those from the UK, the results are dubious at best. In many cases, accident rates have increased in camera locations.

Then there's the cost. If the cameras work and people slow down, who's going to pay for the cameras? The rest of us non-speeding taxpayers, that's who! And if people don't slow down and the cameras keep making money (as is probably the case now), is that not proof that they're not effective?

I know that you don't have to worry about driving yourself through rush-hour traffic, but your constituents do, and nothing snarls rush-hour traffic more than the accordion effect created by a single speed camera. Even people who are not speeding tend to slow sharply, and this ripple runs back through the line of traffic. Rush-hour traffic in camera locations (and I pass three cameras on the way to work) has increased by an order of magnitude. This stop-and-go traffic wastes gas and increases pollution.

Mr. Governor, the public sees these things as revenue generators, so no matter how much of a perceived safety improvement they provide, they're going to be poison at the polls. Please use the funds allotted for camera purchases to hire more human officers. They do a lot more than just police one 30-foot section of road.


I'm sure he'll send me back some horseshit form letter telling me how all our children will be killed if we don't allow him to put Cashcams at every street corner. Sort of like how Bush told us that we'll all be killed by terra-ists if we don't let him steal all Iraq's oil.

Whether it has a D or an R suffix, greed is greed and authoritarianism is authoritarianism.


No Line on the Horizon

Posted: Sunday, March 15, 2009

The new U2 album came out last week, and I've been listening to it during my morning commute. It's not bad, and the more I listen, the more I mentally process the works. So far my favorite songs are "I'll Go Crazy If I Don't Go Crazy Tonight", "Unknown Caller", and "Fez - Being Born". "Magnificent" is also pretty nice.

Tour dates are already starting to come out, and I expect it to be a year-long affair. Jess and I will probably head to the UK this time around, and see them in Glasgow and maybe London, we'll see. Fortunately we got a decent tax return (for once) so that'll help offset tour costs.

We'll probably also do Toronto and (of course) DC. If we do the whole GA line thing again, it'll probably be one of those two.

I'm wondering what song on the new album will be their opening song. Lots of possibilities. I guess we'll see once opening night happens.


I just got my car back, and WOW!

Posted: Friday, February 27, 2009

I seriously love my Mini dealer. I just got my car back after getting a new clutch and transmission put in it, and I can safely say that the car has never, ever been this good, even when it was new.

I always hated the original shifter because whenever I would make and "pull back" shift (like 1-2, 3-4, or 5-6) the shifter would get caught whenever it passed neutral, especially when it was cold. The 2-3 and 4-5 shifts were fine, so I was always perplexed.

Well the new trans has none of that nonsense. All shifts are smooth as silk, and the car is so much nicer to drive. It's like getting a new Mini all over again!

Did I mention I love my dealer?


View older entries >>

cydebar...

If this were a dictatorship, it'd be a heck of a lot easier...just as long as I'm the dictator...

- George W. Bush


news...

...cycling

more...

Cycling feed courtesy of Velo News

...formula 1

more...

F1 feed courtesy of Formula1.com

counter