SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    inconsistent CSS on local and remote hosts

    I have a site that displays inconsistently on my local and remote hosts. I open the pages in IE6x locally and the CSS displays just fine. When I upload the site and call it up from the remote host the CSS does not display the same. Any ideas as to what might be going on here?

    Perplexed

    TIA for any answers...I'm stumped
    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are all the styles bunk or just a few?

    If they're all missing, sounds like the path to the stylesheet isn't correct in the link tag (or perhaps file permissions ???).

    If its only a few, well that would be strange.

  3. #3
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Path and consistency

    Only some of the styles are not showing up consistently. That is, when I load them from a remote host. Here's a URL where it is happening:

    this page is not consistent

    You will notice that "corporate training", "kids program", "English camps" and "Study abroad" are in bold black Arial. The other links are not. It is the other links that concern me. When I load that page (and a few others) all the links remain bold and black as they are supposed to.

    You mention file permissions. Do I need to CHMOD the style sheets or something? Could someone take a look at the source code for the page above and see if I have goofed up in the coding?

    I'll post my style sheet below. Sorry for the long post...but it seems the only way...


    Originally posted by isotope235
    Are all the styles bunk or just a few?

    If they're all missing, sounds like the path to the stylesheet isn't correct in the link tag (or perhaps file permissions ???).

    If its only a few, well that would be strange.
    this page is not consistent
    PHP Code:
     .whitemenu {
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bold;
        
    color White;
    }

    .
    navigation {
        
    font-family ArialHelveticasans-serif;
        
    font-size 10pt;
    }

    P.navigation {
        
    font-family ArialHelveticasans-serif;
        
    font-size 10pt;
    }

    .
    copyright {
        
    font-family ArialHelveticasans-serif;
        
    font-size 8pt;
        
    color White;
    }



    LI {
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
    }

    {
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
    }

    P.copyright{
        
    font-family ArialHelveticasans-serif;
        
    font-size 8pt;
        
    color White;
    }

    H3 {
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bold;
    }

    H2 {
        
    font-family ArialHelveticasans-serif;
        
    font-size 14pt;
        
    font-style italic;
        
    font-weight bold;
    }

    A.copyright:link{
        
    colorWhite;
        
    font-size 8pt;
    }
    A.copyright:visited{
        
    colorWhite;
        
    font-size 8pt;
    }
    A.copyright:active{
        
    colorWhite;
        
    font-size 8pt;
    }
    A.copyright:hover{
        
    color#CB0C27;
        
    font-size 8pt;
    }

    .
    menu{
        
    color:#000000;
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bolder;
    }

    TD.menu A:link{
        
    color:#000000;
        
    text-decoration:none;
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bolder;
    }
      
    TD.menu A:visited{
        
    color:#000000;
        
    text-decoration:none;
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bolder;
    }
      
      
    TD.menu A:active{
        
    color:#000000;
        
    text-decoration:none;
        
    font-family ArialHelveticasans-serif;
        
    font-size 12pt;
        
    font-weight bolder;
    }
      
    TD.menu A:hover{
        
    color:#CB0C27;
        
    text-decoration:none;
        
    font-family ArialHelveticasans-serif;
        
    font-weight bolder;
    }

    H1 {
        
    font-family ArialHelveticasans-serif;
        
    font-size 16pt;
    }


    A:link{
    color:#17366C;
    }
      
    A:visited{
    color:purple;
    }
      
      
    A:active{
    color:#000000;
    }
      
    A:hover{
    color:red;

    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  4. #4
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a very small chance that this is a content-type problem. I know Mozilla in strict mode requires style sheets (usually .css files) to be served with the Content-Type header set to text/css. It might be worth investigating this.

  5. #5
    SitePoint Addict Philip Toews's Avatar
    Join Date
    Dec 2001
    Location
    Kuala Belait, Brunei
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    errrk hunh?

    Content-Type header set to text/css.
    Where do I set this? I'm already using

    <link rel="stylesheet" href="styles.css" type="text/css">
    in the header.

    What about forcing a reload or rather telling the server NOT to cache the page would the following tags in the header do it?

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    TIA for any insight
    Philip Toews Professional esl Educator and ASP.NET wannabe

    http://www.philiptoews.com
    philip@philiptoews.com

  6. #6
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Phil,

    Looks like you know about CHMOD, so I'll assume you're using Apache on Linux or Unix. Make a file called ".htaccess" and add this line to it
    Code:
    AddType text/css .css
    Save the file and upload it to your site's root dir., taking note to upload the file in ASCII mode.

    Also make sure you upload all your CSS files in ASCII mode as well, because they're only plain text documents.

  7. #7
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Everytime you change the remote style sheet, perform a complete refresh on the webpage by pressing CTRL-F5. Internet Explorer doesn't always refresh the CSS normally.
    Wayne Luke
    ------------



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •