Jump to content

Can't get css style sheet to change when I edit on site HELP!


frank9310
 Share

Recommended Posts

Ok will post the code in about 30 minutes but I actually had this same site inside another site where the style sheet  was working, so I posted it to a new ip address and same problem. I don't knnow what code to post. I cant seem to find where it's pulling it from. There's a file called HeaderTemplate.php and I tried to modify that to no avail and put the original copy back in it's place. Then the CSS sheet looks ok. Here's the Header Template page http://64.182.35.117/templates/HeaderTemplate.php

Link to comment
Share on other sites

I don't think it has to do with the style sheet or the headertemplate.php file. Something else is going on. Is there any moderator or someone who I c an have login to check it out?

 

Here's teh HeadTemplate.php code where I think it might be referencing the style sheet though I could be wrong:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

<link href="css/style.css" rel="stylesheet" type="text/css" '>
   <title><?=$aset[siteTitle]?></title><meta dcb license 123456789>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="DESCRIPTION" CONTENT="<?=$aset[siteDescription]?>">
   <META NAME="KEYWORDS" CONTENT="<?=$aset[siteKeywords]?>">
   <style>
      .BlackLink {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
      a.BlackLink:hover {text-decoration: underline}

      .BlueLink {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:underline}
      a.BlueLink:hover {text-decoration: underline}

      .RedLink {font-family:verdana; font-size:11; color:red; font-weight:bold; text-decoration:none}
      a.RedLink:hover {text-decoration: underline}

      a.CatLinks {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
      a.CatLinks:hover {text-decoration:underline}

      a.SubCatLinks {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:none}
      a.SubCatLinks:hover {text-decoration:underline}

      a.TitleLinks {font-family:verdana; font-size:12; color:black; font-weight:bold; text-decoration:none}
      a.TitleLinks:hover {text-decoration:underline}

      .ItemText {font-family:verdana; font-size:11; color:black; font-weight:regular; text-decoration:none}
   
      .sm {font-family:verdana; font-size:11}

   </style>

   <script language="JavaScript">

      function CheckSearch() {

         if(document.f1.what.value=="")
         {
            window.alert('Enter the search criteria, please!');
            document.f1.what.focus();
            return false;
         }

      }

      function CheckFriend() {

         if(document.sfriend.f1.value=="")
         {
            window.alert('Enter your email address!');
            document.sfriend.f1.focus();
            return false;
         }

         if(document.sfriend.f2.value=="")
         {
            window.alert('Enter your friend email address!');
            document.sfriend.f2.focus();
            return false;
         }

      }

      function CheckLogin() {

         if(document.lform.us.value=="")
         {
            window.alert('Enter your username, please!');
            document.lform.us.focus();
            return false;
         }

         if(document.lform.ps.value=="")
         {
            window.alert('Enter your password, please!');
            document.lform.ps.focus();
            return false;
         }

      }

      function CheckForgot() {

         if(document.ForgotForm.u2.value=="")
         {
            window.alert('Enter your username, please!');
            document.ForgotForm.u2.focus();
            return false;
         }
      }

      function CheckRegister() {

         if(document.RegForm.NewUsername.value=="")
         {
            window.alert('Enter your username, please!');
            document.RegForm.NewUsername.focus();
            return false;
         }

         if(document.RegForm.p1.value=="")
         {
            window.alert('Enter your password, please!');
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.p2.value=="")
         {
            window.alert('Confirm your password, please!');
            document.RegForm.p2.focus();
            return false;
         }

         if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
         {
            window.alert('Enter and confirm your password again!');
            document.RegForm.p1.value="";
            document.RegForm.p2.value="";
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.FirstName.value=="")
         {
            window.alert('Enter your First Name, please!');
            document.RegForm.FirstName.focus();
            return false;
         }

         if(document.RegForm.LastName.value=="")
         {
            window.alert('Enter your Last Name, please!');
            document.RegForm.LastName.focus();
            return false;
         }

         if(document.RegForm.address.value=="")
         {
            alert('Enter your address, please!');
            document.RegForm.address.focus();
            return false;
         }

         if(document.RegForm.city.value=="")
         {
            alert('Enter your city, please!');
            document.RegForm.city.focus();
            return false;
         }

         if(document.RegForm.state.value=="")
         {
            alert('Enter your state, please!');
            document.RegForm.state.focus();
            return false;
         }

         if(document.RegForm.country.value=="")
         {
            alert('Select your country, please!');
            document.RegForm.country.focus();
            return false;
         }

         if(document.RegForm.phone.value=="")
         {
            window.alert('Enter your Phone, please!');
            document.RegForm.phone.focus();
            return false;
         }

         if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
         {
            return true;
         }
         
         alert("Invalid E-mail Address! Please re-enter.");
         document.RegForm.email.focus();
         return false;
         

      }

      function CheckProfile() {

         if(document.RegForm.p1.value=="")
         {
            window.alert('Enter your password, please!');
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.p2.value=="")
         {
            window.alert('Confirm your password, please!');
            document.RegForm.p2.focus();
            return false;
         }

         if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
         {
            window.alert('Enter and confirm your password again!');
            document.RegForm.p1.value="";
            document.RegForm.p2.value="";
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.FirstName.value=="")
         {
            window.alert('Enter your First Name, please!');
            document.RegForm.FirstName.focus();
            return false;
         }

         if(document.RegForm.LastName.value=="")
         {
            window.alert('Enter your Last Name, please!');
            document.RegForm.LastName.focus();
            return false;
         }

         if(document.RegForm.address.value=="")
         {
            alert('Enter your address, please!');
            document.RegForm.address.focus();
            return false;
         }

         if(document.RegForm.city.value=="")
         {
            alert('Enter your city, please!');
            document.RegForm.city.focus();
            return false;
         }

         if(document.RegForm.state.value=="")
         {
            alert('Enter your state, please!');
            document.RegForm.state.focus();
            return false;
         }

         if(document.RegForm.country.value=="")
         {
            alert('Select your country, please!');
            document.RegForm.country.focus();
            return false;
         }

         if(document.RegForm.phone.value=="")
         {
            window.alert('Enter your Phone, please!');
            document.RegForm.phone.focus();
            return false;
         }

         if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
         {
            return true;
         }
         
         alert("Invalid E-mail Address! Please re-enter.");
         document.RegForm.email.focus();
         return false;

      }

      function CheckOffer() {
   
         if(document.PostForm.CategoryID.value=="")
         {
            alert('Select the category in which your offer will appear!');
            document.PostForm.CategoryID.focus();
            return false;
         }

         if(document.PostForm.year.value=="")
         {
            alert('Select the vehicle year, please!');
            document.PostForm.year.focus();
            return false;
         }

         if(document.PostForm.SelectMake.value=="")
         {
            alert('Select the vehicle make, please!');
            document.PostForm.SelectMake.focus();
            return false;
         }

         if(document.PostForm.VehicleModel.value=="")
         {
            alert('Enter the vehicle model, please!');
            document.PostForm.VehicleModel.focus();
            return false;
         }

         if(document.PostForm.VehicleColor.value=="")
         {
            alert('Enter the vehicle color, please!');
            document.PostForm.VehicleColor.focus();
            return false;
         }

         if(document.PostForm.mileage.value=="")
         {
            alert('Enter the vehicle mileage, please!');
            document.PostForm.mileage.focus();
            return false;
         }

         if(document.PostForm.DetailedDesc.value=="")

         {
            alert('Describe your vehicle in details, please!');
            document.PostForm.DetailedDesc.focus();
            return false;
         }

         if(document.PostForm.Price.value=="")
         {
            alert('Enter the price, please!');
            document.PostForm.Price.focus();
            return false;
         }

      }

   </script>
</head>
<body>
   <div id="main">
      <div id="header">
      <!--<?=$aset[HeaderImg]?>-->
         <a href="index.php" id="logo"><img src="header_images/<?=$aset[HeaderImg]?>" alt="" /></a>
         <div class="topmenu"><a href="index.php"><img src="images/tm/home.gif" alt="" /></a>
         <a href="advanced.php"><img src="images/tm/search.gif" alt="" /></a>
         <a href="email_admin.php"><img src="images/tm/contact.gif" alt="" /></a></div>
      </div>
      <div id="content">
            <table cellspacing="0" cellpadding="0" border="0" width="100%" id="cont">
               <tr>
                  <td class="left">
                     <a class="tp" href="index.php">Home</a>
                     <a class="tp" href="advanced.php">Advanced Search</a>
                     <?///$homeLinks;?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td class="cats">
                        <div class="title">Categories</div>
                        <div class="wrap">
                           <div id="homelinks" class="ltext">
                              <?=$Categories?>
                           </div>
                        </div>
                     </td></tr></table>

                     <?if (isset($RandomProperty) && !empty($RandomProperty)){?>
                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Featured</div>
                        <div class="wrap">
                           <div class="ltext">
                           <?=$RandomProperty?>
                           </div>
                        </div>
                     </td></tr></table>
                     <?}?>

				     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        
      <div class="title">Join Newsletter</div>
<script>
function CheckMail() {

	if(document.je.u_name.value=="")
	{
		alert('Enter your name, please!');
		document.je.u_name.focus();
		return false;
	}

	if(document.je.u_email.value=="")
	{
		alert('Enter your email, please!');
		document.je.u_email.focus();
		return false;
	}



}
</script>

<br><br>
<form action="join_news.php" method=post onsubmit="return CheckMail();" name=je>
<table align=center border=0>


<tr>
	<td>Name:</td>
	<td><input type=text name="u_name" size=15 class="mtext"></td>
</tr>

<tr>
	<td>Email:</td>
	<td><input type=text name=u_email size=15 class="mtext"></td>
</tr>


<tr>
	<td> </td>

	<td>
		<input type=submit name=s1 value="Send" class="sub1">
	</td>
</tr>

</table>
</form>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Site Stats</div>
                        <div class="wrap">
                           <div class="ltext">
                    
                        <strong>Vehicles Listed:</strong> <?=$vehcountline?>
                           </div>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="wrap">
                        <div class="title">Poll</div>

                           <div class="ltext">
                           <? include "poll.php";?>
                           </div>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">News & Updates</div>
                        <div class="wrap">
                           <div class="ltext">
              <? $news = "select * from car_news order by newsid desc limit 0,2";
                  $newsresult=mysql_query($news) or die(mysql_error());
               while($newsline=mysql_fetch_array($newsresult))
         {
               ?>
<div class="dottedB">
            <strong>
           » <?=$newsline[newstitle]?>
            </strong><br><br>
            <?=$newsline[addedon]?>
            <br> <br>
            <?=$newsline[newdescription]?>
                        </div>
      <?}?>
      <a href="news.php"><strong>More News >></a>

                           
                           </div>
                        </div>
                     </td></tr></table>



               <? if($aset[Article]=='1'){?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Articles</div>
                        <div class="wrap">
                           <div class="ltext">
                        
              <? //Article Retrieving
$art = "select * from cars_articles order by articleid desc limit 0,3";          
$resultart=mysql_query($art) or die(mysql_error());
              while($lineart=mysql_fetch_array($resultart))
         {
               ?>

            <strong>
           <a href="articlesdetails.php?id=<?=$lineart[articleid]?>"><?=$lineart[articletitle]?></a>
            </strong><br><br>

      <?}?>
      <a href="articlesall.php"><strong>All Articles >></a>


                     </div>


                           </div>
                        </div>
                     </td></tr></table><?}?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Links</div>
                        <div class="wrap">
                           <div class="ltext cats">


               <? if($aset[Partner]=='1'){?>
                        
              <? //Links Retrieving
$link = "select * from cars_links order by linkid desc";          
$resultlink=mysql_query($link) or die(mysql_error());
              while($linelink=mysql_fetch_array($resultlink))
         {
               ?>
<div align="left">
            <strong>
           <a href="<?=$linelink[linkurl]?>" target="_blank"><?=$linelink[linktitle]?></a>
            </strong><br>
            </div>
      <?}?>

                     <?}?>

                           </div>
                        </div>
                     </td></tr></table>


                  </td>
                  <td class="right">

 

 

Style sheet

 

body{   margin: 0;
   padding: 0;
   font: normal 22px Tahoma, Arial;
   background: #000;
}
a img{border: none}
#main{
   width: 750px;
   margin: auto;
   background: #fff;
}
#header{
   height: 230px;
   background: url('../images/top.jpg') center top no-repeat #FFFFFF;
}
form{display: inline}
#logo{margin: 40px 0 0 470px; display: block; position: absolute;}
#header .topmenu{
   position: absolute;
   margin: 192px 0 0 523px; 
}
#header .topmenu a{
   float: left;
}
#cont {
   background: #e2e2e2;
}
#cont .left
{
   width: 178px;
   border-right: 1px solid #fff;
}
#cont .left .box{
   width: 178px;
   background: url('../images/l_bg.gif') center 31px repeat-x #eaeaea;
   border-bottom: 3px solid #8d8d8d;
   margin-bottom: 1px;
}
#cont .left .box .title{
border: 1px solid #8d8d8d;
   font: bold 12px Tahoma;
   text-transform: uppercase;
   padding: 8px;
   background: url("../images/l_title.gif") left center repeat-x;
}                 
#cont .left, #cont .right{
   vertical-align: top;
}
#cont .left .quick .wrap{
   padding-bottom: 10px;
}

#cont .left .quick #homelinks{
   padding: 7px;
}


#cont .left .cats a{
background: url("../images/pip.gif") center left no-repeat;
border-bottom: 1px dotted #999;
}
#cont .left .cats .wrap{
   padding-bottom: 10px;
}

#cont .left .ltext a, #cont .left .ltext a:link, #cont .left .ltext a:visited{
   text-decoration: underline;
   color: #000;
}

#cont .left .cats a, #cont .left .cats a:link, #cont .left .cats a:visited{
   text-decoration: none;
   font: normal 11px Tahoma;
   display: block;
   color: #000;
   margin-top: 1px;
   padding: 4px;
   padding-left: 15px;
}

#cont .left a.tp, #cont .left a.tp:link{
   display: block;
   padding: 10px 9px 9px 30px;
   background: url("../images/tmenu.gif") top left no-repeat #000;
   color: #dadada;
   text-decoration: none;
   font: bold 11px Tahoma;
}
#cont .left a.tp:hover{color: yellow;}
#cont .left .box .ltext{
   padding: 10px 15px;
}



.dottedB{
   border-bottom: 1px dotted #fff;
   margin-bottom: 3px;
}
#cont .right{
}
.rbox{
   margin-left: 5px;
   margin-top: 10px;
   padding-bottom: 10px;

}
.rbox1{
   margin-left: 5px;
   color: #fff;
}
#featured td{
   padding: 3px;
   padding-left: 25px;
   cursor: pointer;
   color: #333;
   font: normal 11px Tahoma;
   border: none;
}
#featured table{
   border: none;
}

h1{   margin:3px 10px;
   font: normal 18px "Trebuchet MS";
   color: #666;
}

#footer{margin-top: 10px; color: #666; text-align: right; margin-bottom: 10px;}
#footer a, #footer a:link,#footer a:visited{
   color: #666;
}
.welcome{
   padding: 20px;
   height: 80px;
   color: #6c6c6c;
   line-height: 18px;
   background: url('../images/welcome.jpg') top left no-repeat;
}
.welcome strong{
   color: #000;
}
.png {
   behavior: url('pngbehavior.htc');
}
#adv{
   color: #000;
   padding: 20px;
   background: url("../images/cats.gif") top left repeat-x #b4b4b4;
   border-top: 1px solid #fff;
}
#featured{
  background: url('../images/featured_bg.gif') top left repeat-y;
}
#footer{
   border-top: 1px solid #000;
   border-bottom: 1px solid #000;
   margin-top: 0;
   padding: 14px;
   text-align: center;
   color: #000;
   font: bold 11px Tahoma;
}
#footer a, #footer a:link, #footer a:visited{
   color: #000;
}
#footer #copy{
   font: normal 11px Tahoma;
   color: #000;

}
#featured{
   margin-bottom: 100px
}
#featured .title{
   font-size: 12px;
   margin: -15px 0 10px 15px;
   position: relative;
}

Link to comment
Share on other sites

You have a single quote at the end of your "<link>" line.  Also don't use short tags, i.e. <? Use full php start tags, <?php.  Also I added isset() to your title php code but I don't see any includes where this title might be set.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

<link href="css/style.css" rel="stylesheet" type="text/css">
   <title><?php if (isset($aset['SiteTitle'])) echo "{$aset['SiteTitle']}"; ?></title>

Link to comment
Share on other sites

Also note there are a good number of nesting or other errors in your html markup such as an </div> tag after the </form> tag.

</form>
                        </div>
                     </td></tr></table>

Get Tidy validator for firefox or use another validator to check your page.

 

Link to comment
Share on other sites

Thanks also Drummin! I tried that but still no luck. See when I first installed this script about 2 years ago, it worked perfectly. Now it doesn't for some reason. I didn't change any of the code that I recall back then. I'm not even sure if that HeadTemplate.php is the one that controls or refers to or calls up the CSS style sheet but when I run a search for style fonts, etc., it appears to be the only page that references it. I've been losing my mind for days. I'd gladly pay something for some help to check out the full site. I'm kind of tapped at the moment but could pay something and maybe more if it calls for it when I get paid for the job in the next day or two.

 

What I need to do is make the page background black and then be able to change the fonts etc. to match the black background and I'm at a complete loss to do it. The rest of the site is done.

Link to comment
Share on other sites

The first step in fixing any HTML or CSS errors, is to make sure that your site validates. Preferably as strict. if it doesn't then the browsers will enter quirks mode, and it's anybody's guess what they will do then. Only thing that's certain, is that all browsers will do whatever it is differently.

So learn to use and love the W3 validators, both for HTML and CSS.

Link to comment
Share on other sites

Thanks guys but see it all worked perfectly in the browser before, errors and all as this came from somebody who wrote it a couple years ago and it always worked fine. I tried the code you sent me but it didn't do a thing and had others look at it after those changes on various browsers and no change when I change font sizes, text, etc. and can't figure out exactly what I need to add to change the background color.  I think I need someone to help to check the full site out and see where all the other files are that may be calling this code up and or overriding these 2 pages. Is there any other way I can display what might be going on so somebody can take a full look at the site?

Link to comment
Share on other sites

I downloaded the html found on your link in the first post.  Made a css page called style.css and put it in a folder called css relative to the page.  Checked in four different browsers including Chrome and I see a black background with expected page styling.  Not sure why it's not working for you.  You really need to fix some of those markup errors though.

Link to comment
Share on other sites

AH! Well if you guys could look at this site in Opera, it works perfectly! I only need to be able to tell it to work in IE and Chrome. If anyone could tell me that I'd be floored. Been working on it for days. You can see exactly what the site is supposed to look like in Opera here where the whole layout is also missing in IE & Chrome, unlike working perfectly in Opera http://www.fortpittclassiccars.com/carsforsalefullsite/index.php

 

Here is the HeaderTemplate.php and below that is the pngfix.js code. If I can get those 2 corrected, I think the problem will be fixed. I think maybe something in the browser version isn't right or maybe I'm missing the ones for Chrome? Any help I would be so grateful.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

<link href="css/style.css" rel="stylesheet" type="text/css" />
   <title><?=$aset[siteTitle]?></title><meta dcb license 123456789>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="DESCRIPTION" CONTENT="<?=$aset[siteDescription]?>">
   <META NAME="KEYWORDS" CONTENT="<?=$aset[siteKeywords]?>">
   <style>
      .BlackLink {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
      a.BlackLink:hover {text-decoration: underline}

      .BlueLink {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:underline}
      a.BlueLink:hover {text-decoration: underline}

      .RedLink {font-family:verdana; font-size:11; color:red; font-weight:bold; text-decoration:none}
      a.RedLink:hover {text-decoration: underline}

      a.CatLinks {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
      a.CatLinks:hover {text-decoration:underline}

      a.SubCatLinks {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:none}
      a.SubCatLinks:hover {text-decoration:underline}

      a.TitleLinks {font-family:verdana; font-size:12; color:black; font-weight:bold; text-decoration:none}
      a.TitleLinks:hover {text-decoration:underline}

      .ItemText {font-family:verdana; font-size:11; color:black; font-weight:regular; text-decoration:none}
   
      .sm {font-family:verdana; font-size:11}

   </style>

   <script language="JavaScript">

      function CheckSearch() {

         if(document.f1.what.value=="")
         {
            window.alert('Enter the search criteria, please!');
            document.f1.what.focus();
            return false;
         }

      }

      function CheckFriend() {

         if(document.sfriend.f1.value=="")
         {
            window.alert('Enter your email address!');
            document.sfriend.f1.focus();
            return false;
         }

         if(document.sfriend.f2.value=="")
         {
            window.alert('Enter your friend email address!');
            document.sfriend.f2.focus();
            return false;
         }

      }

      function CheckLogin() {

         if(document.lform.us.value=="")
         {
            window.alert('Enter your username, please!');
            document.lform.us.focus();
            return false;
         }

         if(document.lform.ps.value=="")
         {
            window.alert('Enter your password, please!');
            document.lform.ps.focus();
            return false;
         }

      }

      function CheckForgot() {

         if(document.ForgotForm.u2.value=="")
         {
            window.alert('Enter your username, please!');
            document.ForgotForm.u2.focus();
            return false;
         }
      }

      function CheckRegister() {

         if(document.RegForm.NewUsername.value=="")
         {
            window.alert('Enter your username, please!');
            document.RegForm.NewUsername.focus();
            return false;
         }

         if(document.RegForm.p1.value=="")
         {
            window.alert('Enter your password, please!');
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.p2.value=="")
         {
            window.alert('Confirm your password, please!');
            document.RegForm.p2.focus();
            return false;
         }

         if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
         {
            window.alert('Enter and confirm your password again!');
            document.RegForm.p1.value="";
            document.RegForm.p2.value="";
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.FirstName.value=="")
         {
            window.alert('Enter your First Name, please!');
            document.RegForm.FirstName.focus();
            return false;
         }

         if(document.RegForm.LastName.value=="")
         {
            window.alert('Enter your Last Name, please!');
            document.RegForm.LastName.focus();
            return false;
         }

         if(document.RegForm.address.value=="")
         {
            alert('Enter your address, please!');
            document.RegForm.address.focus();
            return false;
         }

         if(document.RegForm.city.value=="")
         {
            alert('Enter your city, please!');
            document.RegForm.city.focus();
            return false;
         }

         if(document.RegForm.state.value=="")
         {
            alert('Enter your state, please!');
            document.RegForm.state.focus();
            return false;
         }

         if(document.RegForm.country.value=="")
         {
            alert('Select your country, please!');
            document.RegForm.country.focus();
            return false;
         }

         if(document.RegForm.phone.value=="")
         {
            window.alert('Enter your Phone, please!');
            document.RegForm.phone.focus();
            return false;
         }

         if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
         {
            return true;
         }
         
         alert("Invalid E-mail Address! Please re-enter.");
         document.RegForm.email.focus();
         return false;
         

      }

      function CheckProfile() {

         if(document.RegForm.p1.value=="")
         {
            window.alert('Enter your password, please!');
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.p2.value=="")
         {
            window.alert('Confirm your password, please!');
            document.RegForm.p2.focus();
            return false;
         }

         if(document.RegForm.p1.value != "" && document.RegForm.p2.value != "" && document.RegForm.p1.value != document.RegForm.p2.value)
         {
            window.alert('Enter and confirm your password again!');
            document.RegForm.p1.value="";
            document.RegForm.p2.value="";
            document.RegForm.p1.focus();
            return false;
         }

         if(document.RegForm.FirstName.value=="")
         {
            window.alert('Enter your First Name, please!');
            document.RegForm.FirstName.focus();
            return false;
         }

         if(document.RegForm.LastName.value=="")
         {
            window.alert('Enter your Last Name, please!');
            document.RegForm.LastName.focus();
            return false;
         }

         if(document.RegForm.address.value=="")
         {
            alert('Enter your address, please!');
            document.RegForm.address.focus();
            return false;
         }

         if(document.RegForm.city.value=="")
         {
            alert('Enter your city, please!');
            document.RegForm.city.focus();
            return false;
         }

         if(document.RegForm.state.value=="")
         {
            alert('Enter your state, please!');
            document.RegForm.state.focus();
            return false;
         }

         if(document.RegForm.country.value=="")
         {
            alert('Select your country, please!');
            document.RegForm.country.focus();
            return false;
         }

         if(document.RegForm.phone.value=="")
         {
            window.alert('Enter your Phone, please!');
            document.RegForm.phone.focus();
            return false;
         }

         if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.RegForm.email.value))
         {
            return true;
         }
         
         alert("Invalid E-mail Address! Please re-enter.");
         document.RegForm.email.focus();
         return false;

      }

      function CheckOffer() {
   
         if(document.PostForm.CategoryID.value=="")
         {
            alert('Select the category in which your offer will appear!');
            document.PostForm.CategoryID.focus();
            return false;
         }

         if(document.PostForm.year.value=="")
         {
            alert('Select the vehicle year, please!');
            document.PostForm.year.focus();
            return false;
         }

         if(document.PostForm.SelectMake.value=="")
         {
            alert('Select the vehicle make, please!');
            document.PostForm.SelectMake.focus();
            return false;
         }

         if(document.PostForm.VehicleModel.value=="")
         {
            alert('Enter the vehicle model, please!');
            document.PostForm.VehicleModel.focus();
            return false;
         }

         if(document.PostForm.VehicleColor.value=="")
         {
            alert('Enter the vehicle color, please!');
            document.PostForm.VehicleColor.focus();
            return false;
         }

         if(document.PostForm.mileage.value=="")
         {
            alert('Enter the vehicle mileage, please!');
            document.PostForm.mileage.focus();
            return false;
         }

         if(document.PostForm.DetailedDesc.value=="")

         {
            alert('Describe your vehicle in details, please!');
            document.PostForm.DetailedDesc.focus();
            return false;
         }

         if(document.PostForm.Price.value=="")
         {
            alert('Enter the price, please!');
            document.PostForm.Price.focus();
            return false;
         }

      }

   </script>
</head>
<body>
   <div id="main">
      <div id="header">
      <!--<?=$aset[HeaderImg]?>-->
         <a href="index.php" id="logo"><img src="header_images/<?=$aset[HeaderImg]?>" alt="" /></a>
         <div class="topmenu"><a href="index.php"><img src="images/tm/home.gif" alt="" /></a>
         <a href="advanced.php"><img src="images/tm/search.gif" alt="" /></a>
         <a href="email_admin.php"><img src="images/tm/contact.gif" alt="" /></a></div>
      </div>
      <div id="content">
            <table cellspacing="0" cellpadding="0" border="0" width="100%" id="cont">
               <tr>
                  <td class="left">
                     <a class="tp" href="index.php">Home</a>
                     <a class="tp" href="advanced.php">Advanced Search</a>
                     <?///$homeLinks;?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td class="cats">
                        <div class="title">Categories</div>
                        <div class="wrap">
                           <div id="homelinks" class="ltext">
                              <?=$Categories?>
                           </div>
                        </div>
                     </td></tr></table>

                     <?if (isset($RandomProperty) && !empty($RandomProperty)){?>
                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Featured</div>
                        <div class="wrap">
                           <div class="ltext">
                           <?=$RandomProperty?>
                           </div>
                        </div>
                     </td></tr></table>
                     <?}?>

				     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        
      <div class="title">Join Newsletter</div>
<script>
function CheckMail() {

	if(document.je.u_name.value=="")
	{
		alert('Enter your name, please!');
		document.je.u_name.focus();
		return false;
	}

	if(document.je.u_email.value=="")
	{
		alert('Enter your email, please!');
		document.je.u_email.focus();
		return false;
	}



}
</script>

<br><br>
<form action="join_news.php" method=post onsubmit="return CheckMail();" name=je>
<table align=center border=0>


<tr>
	<td>Name:</td>
	<td><input type=text name="u_name" size=15 class="mtext"></td>
</tr>

<tr>
	<td>Email:</td>
	<td><input type=text name=u_email size=15 class="mtext"></td>
</tr>


<tr>
	<td> </td>

	<td>
		<input type=submit name=s1 value="Send" class="sub1">
	</td>
</tr>

</table>
</form>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Site Stats</div>
                        <div class="wrap">
                           <div class="ltext">
                    
                        <strong>Vehicles Listed:</strong> <?=$vehcountline?>
                           </div>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="wrap">
                        <div class="title">Poll</div>

                           <div class="ltext">
                           <? include "poll.php";?>
                           </div>
                        </div>
                     </td></tr></table>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">News & Updates</div>
                        <div class="wrap">
                           <div class="ltext">
              <? $news = "select * from car_news order by newsid desc limit 0,2";
                  $newsresult=mysql_query($news) or die(mysql_error());
               while($newsline=mysql_fetch_array($newsresult))
         {
               ?>
<div class="dottedB">
            <strong>
           » <?=$newsline[newstitle]?>
            </strong><br><br>
            <?=$newsline[addedon]?>
            <br> <br>
            <?=$newsline[newdescription]?>
                        </div>
      <?}?>
      <a href="news.php"><strong>More News >></a>

                           
                           </div>
                        </div>
                     </td></tr></table>



               <? if($aset[Article]=='1'){?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Articles</div>
                        <div class="wrap">
                           <div class="ltext">
                        
              <? //Article Retrieving
$art = "select * from cars_articles order by articleid desc limit 0,3";          
$resultart=mysql_query($art) or die(mysql_error());
              while($lineart=mysql_fetch_array($resultart))
         {
               ?>

            <strong>
           <a href="articlesdetails.php?id=<?=$lineart[articleid]?>"><?=$lineart[articletitle]?></a>
            </strong><br><br>

      <?}?>
      <a href="articlesall.php"><strong>All Articles >></a>


                     </div>


                           </div>
                        </div>
                     </td></tr></table><?}?>

                     <table cellspacing="0" cellpadding="0" border="0" class="box"><tr><td>
                        <div class="title">Links</div>
                        <div class="wrap">
                           <div class="ltext cats">


               <? if($aset[Partner]=='1'){?>
                        
              <? //Links Retrieving
$link = "select * from cars_links order by linkid desc";          
$resultlink=mysql_query($link) or die(mysql_error());
              while($linelink=mysql_fetch_array($resultlink))
         {
               ?>
<div align="left">
            <strong>
           <a href="<?=$linelink[linkurl]?>" target="_blank"><?=$linelink[linktitle]?></a>
            </strong><br>
            </div>
      <?}?>

                     <?}?>

                           </div>
                        </div>
                     </td></tr></table>


                  </td>
                  <td class="right">

 

Then here is the pngfix.js code:

 

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 9) && (document.body.filters)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}

Link to comment
Share on other sites

What I find very odd is you can go to your site in a fresh browser and you don't see any styling, yet clicking any link and styling will show, even if you click a back button to the page that was missing styling it would now have styling.  On any working page, you click Ctrl-F5 and styling goes away.  So it seems to be that style sheet is being downloaded to the browser but being blocked initially when the page loads.  It might be something as simple as the order of your tags but can't be sure as I can't duplicate the problem locally.  Note: most Tags should be lower case and a charset=utf-8 is probably more common so I would try changing the order to have any links after meta tags.  Also note I added "type" attributes to both css and javascript tags.  Not sure about that license meta tag but in didn't look right without ="" so added as such.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
   "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title><?php if (isset($aset['SiteTitle'])) echo "{$aset['SiteTitle']}"; ?></title>
<meta dcb="" license="123456789">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="DESCRIPTION" content="Find the world's greatest classic cars for sale here today. Your dream car is waiting.">
<meta name="KEYWORDS" content="classic cars, sales, for sale, Pittsburgh, PA">    
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
<link href="css/style.css" rel="stylesheet" type="text/css">
   <style type="text/css">
      .BlackLink {font-family:verdana; font-size:22; color:black; font-weight:bold; text-decoration:none}
      a.BlackLink:hover {text-decoration: underline}

      .BlueLink {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:underline}
      a.BlueLink:hover {text-decoration: underline}

      .RedLink {font-family:verdana; font-size:11; color:red; font-weight:bold; text-decoration:none}
      a.RedLink:hover {text-decoration: underline}

      a.CatLinks {font-family:verdana; font-size:11; color:black; font-weight:bold; text-decoration:none}
      a.CatLinks:hover {text-decoration:underline}

      a.SubCatLinks {font-family:verdana; font-size:11; color:blue; font-weight:bold; text-decoration:none}
      a.SubCatLinks:hover {text-decoration:underline}

      a.TitleLinks {font-family:verdana; font-size:12; color:black; font-weight:bold; text-decoration:none}
      a.TitleLinks:hover {text-decoration:underline}

      .ItemText {font-family:verdana; font-size:11; color:black; font-weight:regular; text-decoration:none}
   
      .sm {font-family:verdana; font-size:11}
   </style>

   <script language="JavaScript" type="text/javascript">

Link to comment
Share on other sites

Result: 70 Errors, 37 warning(s)

Fix these first, otherwise we might all just be wasting our time here. As stated above, without the site properly validating the browsers will end up in quirks mode, which renders them both unpredictable and non-conforming. I do not enjoy repeating myself, but I like even less watching you waste everybody else's time. So please, don't, and fix your site instead.

 

Drummin: You don't want to go changing the reported encoding of a site like that, even if it might be UTF-8 compatible. Facts are it was not designed in the charset that was reported originally, and changing it after the fact can only be done after going through every single bit of code. Otherwise you are almost guaranteed to have encoding issues.

Also, the meta-header will be ignored in favor of the HTTP header, so it is very likely that it will not have any impact anyway.

Link to comment
Share on other sites

Thanks Drummin and ChristianF. I tried that code you just posted and it didn't change anything but it didn't break it either.  When I did the validator thing earlier, it was suggesting I change all kinds of php code that always worked fine so as I changed a few of them, I noticed that nothing happened, so I keep thinking it must be something in the way I have the browser compatibility part and how it talks to that pngfix.js file. I'll check it again but when I go to that w3 validator it says there's only 19 errors and 11 warnings and they all look like php code that I can't change.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.