dws has you covered, but i felt very inclined to offer a little advice. If you don't know anything about X but you know a bit about Y, even if you know X is better, you should probably stick with what you know. I primarily use CSS for markup -- i have only (successfully) used CSS for layout/positioning at one site i created. Even though i agree we should use CSS instead of tables for layout, the fact remains that i can get the job done quicker (and know what i am doing) with tables than with CSS. I am not saying i shouldn't be using CSS for layout, i am simply saying that i don't have time right now to really grok CSS.

Having said all of that, should you wish to see what using CGI.pm and CSS layout looks like instead of more examples that you can get from dws's link above ... here is an example that uses CGI.pm to recreate the two box example from Owen Briggs' Box Lessons. But first, here are some links from hacker of sites that he has designed using CSS instead of tables. Hope this helps. :)
use strict; use warnings; use CGI qw(:standard); my $style = do {local $/;<DATA>}; print header(), start_html(-style=>{-code=>$style}), div({-id=>'content'}, 'blah ' x 40), div({-id=>'content2'}, 'blah ' x 40), end_html, ; __DATA__ #content { float: left; padding: 10px; margin: 20px; background: #666; border: 5px solid #ccc; width: 300px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 270px; } html>body #content { width: 270px; /* ie5win fudge ends */ } #content2 { float: left; padding: 10px; margin: 20px; background: #666; border: 5px solid #ccc; width: 300px; /* ie5win fudge begins */ voice-family: "\"}\""; voice-family:inherit; width: 270px; } html>body #content2 { width: 270px; /* ie5win fudge ends */ }

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to (jeffa) Re: CGI Tables by jeffa
in thread CGI Tables by sulfericacid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.