-4

I am reading css file from aspx

Login.aspx

<HTML>
        <HEAD>
            <title>LoginWebForm</title>
            <meta name="vs_showGrid" content="True">
            <link href="stylesheets/layout.css" rel="Stylesheet" type="text/css">
            <link href="stylesheets/LoginWebFrom.css" rel="Stylesheet" type="text/css" />
    </HTML>
        </HEAD>

and directory structure is,

MyProject

- folder1
- folder2
- stylesheets
     - layout.css
     - LoginWebForm.css
- Login.aspx 

So, here Login.aspx and folder stylepsheets are on same level, it means i can by specifying path as, "stylesheets/layout.css" but. this does't work. If I run same application on **Windows 2012 server then it works**. but when I run it on Windows 7 then it it doesn't work.

Can you please let me know whether this is OS related problem OR some settings required/ configuration required to be run the application on Windows 7.

Thanks You

Mrunal
  • 111
  • 1
  • 2
  • 11
  • Start by analyzing the problem _properly_ … What does the browser console say? Was there a 404/500/other HTTP error for that resource maybe? Something else like a warning saying this was delivered with the wrong Content-Type to be interpreted as a stylesheet? …? – misorude Jan 17 '19 at 10:32
  • press f12 and check the error properly.. don't simply ask questions without investigating. thanks – Xenio Gracias Jan 17 '19 at 10:33
  • There is no error showing on console. Since .css file not found, respective UI changes are not getting applied. All this is checked (F12)/ found on internet/ debug, and then asked here for some kind of help. – Mrunal Jan 18 '19 at 11:57

1 Answers1

0

Your html structure is not good:

<HTML>
    <HEAD>
        <title>LoginWebForm</title>
        <meta name="vs_showGrid" content="True">
        <link href="stylesheets/layout.css" rel="Stylesheet" type="text/css">
        <link href="stylesheets/LoginWebFrom.css" rel="Stylesheet" type="text/css" />
</HTML>
    </HEAD>

This would be a "normal" html structure:

<HTML>
    <HEAD>
        (head content)
    </HEAD>
    <BODY>
        (body content)
    </BODY>
</HTML>

Try to fix the html structure and maybe works after that ;-) Another thing you could try is start your CSS paths with "/", for example:

<link href="/stylesheets/LoginWebFrom.css" rel="Stylesheet" type="text/css" />

And... Why one of your "link href..." lines ends with "/>" and the other one ends with ">" ??

I think both are correct ways (not sure now), but... Why you do it in a different way in any case??

good luck

Jortx
  • 707
  • 1
  • 7
  • 22