you dont know any perl do you?

What do you expect perl to do when it sees this code?

#----------------------------------# # 2. Print the doctype statement # #----------------------------------# <style> body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } </style> </body>
I'll give you a hint <> is an i/o operation in perl, when it sees <style> it is going to try to read from an opened file named style. That is not what you want at all is it? perl statments are separated by semi-colons, that is a whuge block of stuff with no semi-colons in it.

You expect that to be text, in perl text is inside quotes. For example

#----------------------------------# # 2. Print the doctype statement # #----------------------------------# print ' <style> body { background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; margin-right: 200px; } </style> ';
But you dont understand what your other parts are doing either. When dealing with html the print $query->header; better be run before anything else gets printed. Anything printed before that line will be considered a header, and those statements do not look like headers at all.

Maybe you will even also notice that i too out the </body> part. That is part of the closing protocol of html. You will want to print that last. print '</body>'; will do just fine.

So in short, you need to learn more about perl, and you need to learn more about html or else you are going to be like someone trying to fix his car who only knows that the motor is under the hood. Luckily this wont kill you, like grabbing on to the battery posts or getting your shirt caught in the fan belt could.


In reply to Re: add css to html code by huck
in thread add css to html code by Anonymous Monk

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.