3

WAMP server loading index.html just fine but not loading any additional css style sheets and script files.

I've tried these

<link rel="stylesheet" href="wamp/www/AngularJS_Practice/css/style.css"/>
<link rel="stylesheet" href="/css/style.css"/>
<link rel="stylesheet" href="css/style.css"/>

edit

My current index.html page is

<!DOCTYPE HTML>
<html lang='en'>
<head>

<title>Electronic Components</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/style.css">

</head>
<body>
<h2>Lorem Ipsum</h2>


</body>
</html>

edit 2 css

h2 {

color: orange;
font-style: italic;

 }
Brook Mesfin
  • 41
  • 1
  • 6

5 Answers5

4

Refresh your browser cache. Press 'Ctrl+F5' That'll do the trick.

Muneeb
  • 41
  • 2
0

This worked for me:

<link rel="stylesheet" href=".\style.css">
ZygD
  • 22,092
  • 39
  • 79
  • 102
Shivu
  • 1
-1

You forgot to use type

<link rel="stylesheet" type="text/css" href="css/style.css">

Also note

 <link ....>  // this is right
 <link ..../> // avoid this

Your HTML file seems right , try making this small css file in css folder and link to it

body{background-color:blue;}

Test this

Golden_flash
  • 492
  • 1
  • 6
  • 14
-1

I had a same issue and what worked for me is this

<link rel="stylesheet" type="text/css" href="./css/style.css">

Enjoy

-1

select the full url from url bar and then press ENTER... It works! ;)

Avirup
  • 1
  • 2
  • 1
    Welcome to Stack Overflow! To me it is unclear how this would solve the OP's question. Please expand and clarify the steps and why it works. – Mathyn Mar 09 '19 at 13:29
  • when you select the url and then prress ENTER the header information is resent to the server(whether that be your local server or remote one)...since new header information is resend to the server a new page is requested from the server and hence your page will be refreshed and everything will work... If this don't work then try restarting your servers...HOPE IT HELPS – Avirup Mar 10 '19 at 14:05