By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

css not working in CGI-PERl

P: 1
Hello to all members,

I have made a simple css stylesheet. When i include it in php file it works fine, but when i call it in CGI, it is not showing properly. Please help me. I am pasting my whole html file here.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<script type="text/javascript" language="JavaScript">
function toggleMenu(objID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
ob.display = (ob.display == 'block')?'none': 'block';
<script type="text/css" rel="stylesheet">
.mC {width:100px; margin:5px; float:left; background-color:red;}
.mH {color:#60c; cursor:pointer; font-weight:bold; solid #800;}
.mL {display:none; margin-bottom:10px;}
.mO {margin-left:1px; display:block;}

<!--<link href="./clmenu.css" type="text/css" rel="stylesheet" />-->
<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu1')"> Manage </div>
<div id="menu1" class="mL">
<a class="mO" href="../squidguard_ui/client_group.php?groupadd=true">Group</a>
<a class="mO" href="../squidguard_ui/client_group.php?IP_group=true">LAN-IP</a>
<!--<a class='mO' href='../squidguard_ui/client_group.php?timezone=true'>Manage Time-Zone</a>-->

<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu2')">Manage Time</div>
<div id="menu2" class="mL">
<a class="mO" href="../squidguard_ui/client_group.php?timespace=true">Time-Space</a>
<a class="mO" href="../squidguard_ui/client_group.php?timezone=true">Time-Zone</a>
<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu3')">Web-Sites</div>
<div id="menu3" class="mL">
<a class="mO" href="../squidguard_ui/client_group.php?whitelist=true">Whitelist</a>
<a class="mO" href="../squidguard_ui/client_group.php?blacklist=true">Blacklist</a>

<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu4')">ACL</div>
<div id="menu4" class="mL">
<a class="mO" href="../squidguard_ui/client_group.php?acl=true">ACL</a>
<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu5')">Allow</div>
<div id="menu5" class="mL">
<a class="mO" href="cfurl.cgi">URL</a>
<a class="mO" href="cfextn.cgi">File Extension</a>

<div class="mC">
<div class="mH" onmouseover="toggleMenu('menu6')">Deny</div>
<div id="menu6" class="mL">
<a class="mO" href="blockurl.cgi">URL</a>
<a class="mO" href="cgi-bin/blockextn.cgi">File Extension</a>
<a class="mO" href="blockphrase.cgi">Phrase</a>

i am calling this file like :-

my $template = HTML::Template->new(filename => 'test.tmpl');
print $template->output;

It shows me output but not in the proper format. All the links appears in the left side as vertically not horizontaly and it is not showing even the color which i am using. Please help me, i will be very thankful to you all.
Mar 8 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 7,435
May be a server setup issue but two things to correct:

<script type="text/javascript" language="JavaScript"> should be:
<script type="text/javascript">

<style type="text/css"> and end with </style>
Mar 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.