CSS NotWorking Properly on Hosted Server

Discussion in 'FTP' started by misoftte, May 10, 2012.

  1. Again another problem, my hosted site CSS is not working properly while it is working perfectly on the local server in all browsers. I have viewed the similar Forum Posting dated 18th March, 2012 by "dshadle", but Winhost staff answer is not helpful as there is no clear indication what to do rather than somegeneral advice.

    In my case I have checked/view sources and it seems css tags/id etc has been properly coded and browsed same explorer (IE9).

    Though 'Parsing CSS is a function of browser, not the server', my question is why it is behaving differently when accessed from server in the same browser?

    Anyway, I am providing screen shots Links in the attched from both my local server and from my Winhost server.


    My Server Link is : http://misofttech.com/myapp/misoccerwebsite/Matches

    Would be highly appreciated if anyone kindly come forward with a solution to the problem.

    Thanking you in advance.

    Regards,
    Misoftte, Sydney Australia
     

    Attached Files:

    Last edited by a moderator: Oct 14, 2015
  2. Elshadriel

    Elshadriel Winhost Staff

    I would suggest double checking the path information.
     
  3. CSS File Path?

    Hi, by path you mean css file path reference in my code? So far, I think it is coded correctly with ~ to mean server relative path. And it is working correctly on my local server, otherwise it would malfunction here. Anyway, I am just putting below the related code for your details reference.

    My css file in my site root directory as: /mysoccerwebsite/Styles/Site.css

    And referenced in my site root: _SiteLayout.cshtml file as
    <head>
    <meta charset="utf-8" />
    <title>MySoccerTeam - @Page.Title</title>
    <link href="@Href("~/Styles/Site.css")" rel="stylesheet" />
    <link href="@Href("~/favicon.ico")" rel="shortcut icon" type="image/x-icon" />
    <script type="text/javascript" src="@Href("~/jquery.js")"></script>
    </head>

    FYI, my java script is also working fine from the host, only the table border, colour and cell alignment is working differently. I have also checked using the IE view source feature where I found css element and Id reference seemed to be ok.

    Somewhere something wrong. I am very much puzzled now. Would appreciate if someone can elaborate more.

    misoftte,
    Sydney, Australia
     
  4. CSS Not Working - Resolved

    Hi All,

    Like before, I have been able to Resolve my problem my self (Obcourse with your clues).

    I understand what happend:
    1) Though I changed my cssfile path to point root path by putting ~, in fact it was not going to the server. Rather it was using previous cache.

    2) I then republish the site with overrding the previous files.

    3) After that, it is now working fine.

    Thanks anyway for giving me insight thinking.

    misoftte,
    Sydney, Australia
     
  5. ComputerMan

    ComputerMan Winhost Staff

    Thank you for letting us know that you resolved your issue and how you did it.
     

Share This Page