Cellpadding and Cellspacing in CSS (part 2)

CSS, XHTML No Comments »

Here is a follow up to the cellpadding and cellspacing post I made a while back. The cellpadding and cellspacing can be completely controlled in CSS. I realized today; I spoke only about collapsing the borders and not creating spacing (or the equivalent of cellspacing equal to something other than 0).


Here are some HTML4 and CSS/XHTML equivalents:



HTML4: <table cellspacing="0" cellpadding="0">
CSS: table { border-collapse: collapse; } table tr td { padding: 0px; }



HTML4: <table cellspacing="2" cellpadding="0">
CSS: table { border-collapse: separate; border-spacing: 2px; } table tr td { padding: 0px; }



HTML4: <table cellspacing="2" cellpadding="2">
CSS: table { border-collapse: separate; border-spacing: 2px; } table tr td { padding: 2px; }



You may want to place these definitions into a CSS class so you can quickly reference your table definition in XHTML:



CSS:

table.info { border: 1px solid #ccc; border-collapse: separate; border-spacing: 2px; }
table.info tr th { font-weight: normal; text-align: right; }
table.info tr td { font-weight: bold; padding: 2px; }




HTML:

<table class="info">
<tr><th>First Name:</th><td>Chris</td></tr>
<tr><th>Last Name:</th><td>Schuld</td></tr>
</table>



Here is what it will look like:

First Name: Chris
Last Name: Schuld



No Comments - Post Your Comment »
Digg!

Finding symbolic links in linux

Linux No Comments »

I always have to use the man page of find to remember this — hopefully writing it down will help.  Here is how you find all of the symbolic links in a linux path:

find / -type l
No Comments - Post Your Comment »
Digg!

pdftk for CentOS5 (AccessPDF for CentOS 5)

CentOS5, Linux No Comments »

Today I ran across a project need for pdftk (AccessPDF) for CentOS5.  Adding pdftk to CentOS5 was more of struggle than I would have guessed because it was not available in most of the repos I normally use.  Google did not yield any pre-build RPM files for pdftk for CentOS5 so I built them for both 32bit and 64bit.

You can access it here pdftk-112-1i386.rpm (for CentOS5 32bit) and here pdftk-112-1×86_64.rpm (for CentOS5 64bit).


No Comments - Post Your Comment »
Digg!

Cellpadding and Cellspacing in CSS

Web Development 1 Comment »

Those of us who learned HTML early in the game are familiar with HTML table parameters cellpadding and cellspacing.  In a positive way they were deprecated in HTML4 so you must use CSS to control the padding and spacing now.

Here is how you do it in CSS:

border-collapse: collapse;

A nice line to place in your global CSS file (if you use one) is:

table { border-collapse: collapse; }

1 Comment »
Digg!

Common Web Banner Sizes

Web Development No Comments »

I never can find this information when I need it so I am writing it down:

Here are the common web banner sizes:

  • Banner - 468px X 60px
  • Leaderboard - 728px X 90px
  • Skyscraper - 120px X 600px
  • Wide Skyscraper - 160px X 600px
  • Large Rectangle - 336px X 280px
  • Rectangle - 300px X 250px
  • Square - 250px X 250px
  • Small Square - 200px X 200px

I took the name of these sizes from google as they were kind enough to name them

No Comments - Post Your Comment »
Digg!

Search and Replace in Files

Linux, Perl, Regular Expressions (regex) No Comments »

Here is how to do a search and replace using Perl regex over a set of files:


perl -pi -e ’s/source/destination/g’ *.ext



No Comments - Post Your Comment »
Digg!

Web Development Links

Web Development No Comments »

Lorem Ipsum - http://www.lipsum.com/

Color Schemer Online - http://www.colorschemer.com/online/

No Comments - Post Your Comment »
Digg!

Playing MP3 Files in Fedora 8 using KDE

Fedora, Linux 2 Comments »

To play MP3 files in Fedora 8 with KDE you need to add software to your default installation. This software does not come “stock” with KDE because the software is not free and RedHat is required to filter it — therefore if you download this update make sure you check the licensing agreements:

  1. First, add Livna sources using rpm
    rpm -ivh http://rpm.livna.org/livna-release-8.rpm
  2. Next, Install kdemultimedia-extras-nonfree** using yum
    yum install kdemultimedia-extras-nonfree
  3. That is it, next launch Amarok as an example and hello MP3 music!
    Amarok Launching
    Q: Hey Chris, why does the kdemultimedia-extras package end in “-nonfree”
    A: Good question, tough answer, the kdemultimedia-extras-nonfree package contains plug-ins which cannot be shipped by Red Hat / Fedora because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.

2 Comments »
Digg!

Playing MP3 Files in Fedora 8 using Gnome

Fedora, Linux No Comments »

To play MP3 files in Fedora 8 you need to add software to your default installation:

  1. First, add Livna sources using rpm
    rpm -ivh http://rpm.livna.org/livna-release-8.rpm
  2. Next, Install Rhythmbox (assuming you are using Gnome) using yum
    yum install rhythmbox
  3. Next, Install gstreamer-plugins-ugly** using yum
    yum install gstreamer-plugins-ugly
  4. That is it, next launch Rythmbox and hello music!
    Rythmbox Launch

    Q: Hey Chris, why does the gstreamer-plugins end in “-ugly”
    A: Good question, tough answer, the GStreamer is a streaming media library which contains plug-ins which cannot be shipped in gstreamer-plugins-good because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.

No Comments - Post Your Comment »
Digg!

The Ultimate ‘vi’ Shortcut List

Linux 1 Comment »

I am in the process of building the ultimate ‘vi’ shortcut list:

  • Remove Every Other Line:
    :g/.*/norm jdd
1 Comment »
Digg!
Original Design by j david macor.com. Original WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in