Does the webserver show that it is serving the css and image file, or does it show a 404? Are you sure the path is correct? Have you enabled your browsers developer tools to help track down what's going wrong?

On a Perl note I'd suggest you use a template system (HTML::Template/Template) to separate your perl code from the HTML/CSS/JavaScript code. Get the static page working then populate it with your data generated by your perl code. Tutorials->Framework, Templating, and Content Management Systems->HTML::Template Tutorial.

Update:

print "</body>\n"; print "</html>\n";

You end the page then print a table. Print the whole page then close the body and html tags.

You create variables containing database connection details and never use them.

Validate your HTML.

Update 2:

You use data provided user data directly into a SQL query, which can be dangerous. See the DBI documentation on placeholders and bind variables. Also:


In reply to Re: CGI and CSS by marto
in thread CGI and CSS by AdrianJ217

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.