Problem connecting css and html

i use notepad++ and i cant seem to link my css and html files.
“<link rel=“stylesheet” type=“text/css” href=“stephens/new 3.css” />”
that is exactly what i have written in my html document and it still wont work.
any suggestions?

The href=“stephens/new 3.css” path is a relative path.

Try a link instead:



<!-- SPACE NOT ALLOWED -->
<link rel="stylesheet" type="text/css" href="http://yourSite.com/assets/css/stephens/new 3.css"  />

<!-- VALID APACHE FILENAMES -->
<link rel="stylesheet" type="text/css" href="http://yourSite.com/assets/css/stephens/new3.css"  />
<link rel="stylesheet" type="text/css" href="http://yourSite.com/assets/css/stephens/new-3.css"  />
<link rel="stylesheet" type="text/css" href="http://yourSite.com/assets/css/stephens/new_3.css"  />


Also just noticed there is a space in the CSS filename which is not allowed on Apache Servers. Try removing the space (%20) or replacing the with a dash, hyphen or an underscore.

I have not written out the link in 10 years. It’s always just a template I made 10 years ago. Here is that template…

<!DOCTYPE html><html><head><meta charset=“UTF-8”>
<title>Initial html Settings</title>
<meta name=“description” content=“”>
<meta name=“keywords” content=“”>
<meta name=“author” content=“”>
<meta name=“copyright” content=“”>
<link href=“styles.css” rel=“stylesheet” type=“text/css”>
</head>
<body>

<div id=“wrap”>
<div id=“head”></div>
<ul id=“nav”></ul>
<div id=“content”>
<div id=“left”></div>
</div>
<div id=“foot”></div>
</div>

<script type=“text/javascript” src=“temp.js”></script>
</body>
</html>

thanks for the help lads but still no luck. any chance it could be the laptop im using?

This is really easy to do, so you must be making a simple mistake, but we don’t have enough info. What is your site structure? Also, avoid spaces in your file names and URLs. It makes for an awful mess. So make sure your file names are something like

new3.css

or

new-3.css

Undoubtably a path issue. Layout your path structure and show your css link to us.

Example…

Root = /
/index.php
/css/styles.css

If you use html solution provided in post#2 and use Firefox to display the your page “View source”. Clicking on the html link should display your CSS file if and only if the path is correct

ok so i scraped everything i had on that document and started from scratch again and this time it worked :smiley: thanks for the help!