CSS And Tables

No Legs

If you use tables in your html, you probably know that tables come out looking pretty awful.

The default settings really  suck.

To instantly improve the look of tables, you can eliminate the double outline that comes with bog-standard settings. Dump excess lines and give a sleek contemporary look to all your tables with a simple CSS property. Its called border-collapse.

Add the following to your CSS style sheet for instant improvement.

< style type="text/css">
table { border-collapse:collapse; }

You can also add...

table, td, th { border:1px solid black; font-family:tahoma, sans-serif; font-size:95%; }
.title { background:#ccc; text-align:center; color:#000; font-weight:bold; }
.sub  { background:#ccc; text-align:center; color:#000; font-weight:bold; }
</style>

Add the following to <td>

<tr>
  <td class="title" width="33%">Height</td>
  <td class="title" width="33%">Male</td>
  <td class="title" width="33%">Female</td>
</tr>
<tr>
  <td class="sub">ft in</td>
  <td class="sub">lbs</td>
  <td class="sub">lbs</td>
</tr>

Here's what the table looks like without CSS:



















Awful.

Here's what the table looks like with CSS:



















Much better.

Done!

Emacs Macros

Faster Than A Speeding Bullet

If you use Emacs but haven't tried macros, you are missing a fast powerful tool. Emacs macros are dead easy to use. Start record. Stop record. Run macro. Its that easy.

For executing repetitive tasks, macros are a big time saver.

To start a macro record, hit 'Ctrl-x (' and type what ever action you want.

Ctrl-x (


M-x start-kbd-macro

To stop a macro record, hit 'Ctrl-x )' then you can run the macro.

Ctrl-x )


M-x start-kbd-macro

To run the last recorded macro, hit 'Ctrl-x e'.

Ctrl-x e


M-x call-last-kbd-macro

To save the macro for future use, do:

M-x name-last-kbd-macro

Give the macro a name, then if you want to run the macro again, do:

M-x macroname

You need to plan a little before you record the macro. The macro action doesn't always go the way you want. Take it on a test run and evaluate results. If the macro is not doing what you expected,  re-record it with adjustments.

If you're planning on running the macro several times, you can use, repeat last action.

Ctrl-z

Done!

Web Hosting

Hit 'n' Miss

If you're thinking of a running a website with a host provider be careful before you commit. Read the small print. I repeat. Read the small print. A lot of companies use clauses buried in small print to catch you. I've been caught a few times.

I have a few websites I look after and used a number of hosting companies, mostly with poor results.

1and1.com
Avoid. These guys are crooks. Scam merchants extreme. I purchased a discounted domain name through them and discovered I had to host with them as part of the discounted price. It was about a year before I could transfer the domain. Even then, they made it virtually impossible to complete the transfer. I had to jump through so many hoops, I felt like a circus dog. They hit you with big hidden charges. For example, if your credit card transaction fails at renewal, they impose a $50 fee. They offer hosting plans starting at $1.99. So how does that make sense?

Awful. Avoid. At all costs.

Powweb.com
Avoid. Poor customer service. Slow servers. Hidden charges for additional services. They increase prices after they hook you.

Bad. Avoid.

GoDaddy.com
Avoid. Their servers are dead slow. Customer support is poor. When I missed the renewal of a domain name some years ago. GoDaddy wanted me to pay $80 for the domain. The domain only cost $5. I let the domain go.

Bad. Avoid.

Netfirms.com
I hosted with Netfirms for the last 2 years. Okay for domain name purchase, but hosting is a nogo. Their hosting servers are toooooooooo slow. It takes an age to update content if you use Wordpress with a MySQL backend database.

Netfirms auto-renews hosting plans, even if you don't want it. You must give them notice to quit.

Netfirms customer service is poor. One time I set up an online store using Zen Cart. The store installed with scripting errors. When you clicked certain links, it load an error page. I emailed Netfirms customer service for help and to point out the install script error. It took them around a week to respond. Fortunately it was not a critical set up, I was testing software so it was not a problem. Updating Wordpress was always problematic at Netfirms. It would take 2, 3 or more attempts to get Wordpress to update. Most times it failed to complete. Even if I left it run for the afternoon.

One upgrade did not complete and the MySQL database was corrupted. 2 years blog posts evaporated along with the database. The database backup I did was also corrupt. I didn't lose data, as I made copies of all blog entries before the upgrade. I lost time recreating the blogs afterwards.

Netfirms are okay for domain name purchase, though they charge 80% more for domain name renewal than for a new purchase.

Slow. Everything was slow, except payment processing.

HostGator.com
HostGator.com were recommended to me. I started hosting with them in June this year. The servers are way faster than Netfirms. I can upload content to Wordpress in seconds, that took 10+ minutes with Netfirms.

Customer support is good too. I queried them about a domain and some changes I wanted to make. Customer support responded immediately with a ticket number and answered they query within 2 hours. That looks like good support.

I installed some apps on HostGator. They completed without fault.  I will only pass judgement on these guys after I have been with them for a year. But for the present time they seem good.

Review Sites
Before you decide on a hosting company, Google for customer feedback on the host provider you plan to use. GoDaddy.com has an awful record, as does 1and1.com.

Avoid so called independent review sites. Many get a kickback for each referral. The best way to gauge a company is look at customer dis-satisfaction. Forget the glowing reports. Look for the number of bad experiences. Skip the great reviews. I want to know how the company deals with queries, complaints, errors, overcharging, refunds, downtime, etc.

Do research before you part with money. Once you sign, your tied to 'em for 12 months or whatever the term of the agreement.

Webhostingjury.com
Before I settled on HostGator, I used Webhostingjury.com to check customer feedback. Do the same with the hosting company you plan to use.

Here's HostGator customer feedback.

Here's 1and1 customer feedback.

Here's Powweb customer feedback.

Here's Netfirms customer feedback.

Here's GoDaddy customer feedback.

Here's Fasthosts customer feedback.

As you can see, the customer feedback is way different from what the company will tell you.

According to this guy, 1and1 can do no wrong. He has them at #1 on his list. Wonder if he's getting a payment for referrals? That is so cynical!

I included no links to the hosting providers. I only put in links to customer reviews. I get nothing for writing this up. Its to help others avoid making mistakes, and being ripped by crooks on the Net.

Done!

Emacs - Change Fonts

Pretty Shapes


I normally work with a dark background and light gray text when using Emacs for general text work or code. If you want to open a document created in OpenOffice Writer, and you want to get the same look while you edit the document. You can do that.

To get the OpenOffice Writer look, first change the colors

M-x set-background-color
white

Next we set the text color to dark

M-x set-foreground-color
black

We have the colors, now we need to change font type and font size.

Press Ctrl key and right click mouse in Emacs frame. Emacs displays a menu. Select Options > Default Font. Emacs will pop up a font selection dialogue box.

Select Georgia
Select Regular
Select 12

Click okay to finish.

Your done!

Emacs - Margins And Word Wrap

Break Here


In text mode, Emacs wraps text and line breaks at the character. Text is displayed to Emacs  border. That's fine for code, but if you need to edit a lot of text, its nice to persuade emacs to break lines at word boundary and to have a small margin between the text and the outer edge.

Change word wrap boundary, do:

M-x visual-line-mode

You get a ragged edge on the right side a-la word processor.

Done!

Emacs - Color Change

Chromatic


If you use Emacs with a set color scheme but would like to change the color scheme temporarily, its easy.

You can do it on the fly.There's no need to restart Emacs. Here's how:

To change background color, do:

M-x set-background-color
black

To change foreground color, do:

M-x set-foreground-color
green

Its that easy.

If you want to change colors back, step through the routine again.

Go to it!