in reply to New to this... CSS styles are not applied to the HTML within the PERL script. Please help!

Greetings.

While not specifically a Perl issue/problem. I can tell you, it's an ENCODING problem. Given this is a Perl forum. I'm going to suggest a few changes, and provide you with the cause. So you will hopefully refrain form doing it again.

The Perl part (use this):

#!/usr/bin/perl use strict; use warnings; use feature qw(say); use Authen::Captcha; use CGI; # # # # # say qq~<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" + /> # # # # # THE FOLLOWING LINE IS YOUR PROBLEM (explained later) <link href=“styles.css" rel="stylesheet" type="text/css" media="screen +"> <!-- InstanceEnd --></html>~;
OK. It is clear this is one of those COPY/PASTE problem, and perhaps you, or your editor need to be more alert. :)
Seems you're boasting UTF-8, but you didn't notice you have an embedded character prefaced to style.css. If you had examined the source of your web page, in your browser. You probably would have seen it. What you'll need to do as a rule, is ensure the source you're working with is in the same encoding you're working with. For example, the source you're copying/opening is latin-1, and you paste into UTF-8 without paying attention. This is what you'll get (the problem you have). If you have a decent editor, you should have easily seen the embedded character. If it's a decent editor, maybe re-examine the settings. You should be able to convert from one encoding, or another, to one, or another, or better, just use, convert to, UTF-8. :)

Best wishes.

--Chris

ˇλɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

  • Comment on Re: New to this... CSS styles are not applied to the HTML within the PERL script. Please help!
  • Download Code