www.webdeveloper.com
Results 1 to 7 of 7

Thread: Web page displays css properly from ie but not from a folder.

  1. #1
    Join Date
    Aug 2012
    Posts
    4

    Web page displays css properly from ie but not from a folder.

    Web page displays css properly from ie but not when I try to view the page directly from within a folder.
    On my server when I go to the web address of the page the web page will display properly with css formatting. The probblem is when I go directly to a folder on the server and double click the html file. It doesn't display itself with the css formatting any longer.

    Why is opening a web page directly from the folder different than navigating it via a browser? The browser still opens to display the html even when I open the file from it's folder location.

    THanks in advance for any explanation or fixes for this.

  2. #2
    Join Date
    Mar 2012
    Posts
    1,111
    Are you sure that you have direct file access to the web server? Also, when you click on the html file, what app is it displayed in?

  3. #3
    Join Date
    Aug 2012
    Posts
    4
    I can log directly into the server and access the folder where the html file is.
    When I open it from there, it opens in internet explorer8.

  4. #4
    Join Date
    Aug 2006
    Posts
    1,897
    With the html file in a folder, have you corrected the link to the .css file, or is the css listed within the html itself?

    Dave

  5. #5
    Join Date
    Aug 2012
    Posts
    4
    C:\xampp\htdocs\ts\tss\mh\tts is where the file is.
    C:\xampp\htdocs\ts\tss\mh\stylesheets is where the css file is.

    Code:
    <link rel="stylesheet" href="/ts/tss/mh/stylesheets/stylesheet.css" type="text/css" />
    is the html in the page.

  6. #6
    Join Date
    Aug 2006
    Posts
    1,897
    I don't have this setup, so take this with a grain of salt...

    When you open the file via a web browser, you're using http with all its goodness. When you open it via the file manager, it is not using http, it is getting the file via a file copy, for which the XAMPP server is not involved, and therefore not feeding your browser the CSS. In other words, it could be that what you're seeing is perfectly normal behavior.

    Dave

  7. #7
    Join Date
    Aug 2012
    Posts
    4
    That's what I was afraid of. I was hoping there was a rig for this. I'll leave this as unresolved for a few days in hopes someone had an idea on how to get around that.

    Thanks for the help thus far.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles