Click here to Skip to main content
15,902,731 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
A very basic but big proplem , my html file is not showing css effects.
I have created project on desktop
The folder includes three files
1) images
2) index.html
3) css
css folder includes styles file

What I have tried:

<pre><!DOCTYPE html>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="css/styles.css" />

<div class="container">
      <div class="navbar">
				     <li><a href="">Home</a></li>
	                 <li><a href="">Products</a></li>
				     <li><a href="">contact us</a></li>


styles.css file
	text-align: center;

nav ul li{
	list-style: none;
	display: inline-block;
	margin-right: 30px;
Updated 15-Sep-22 9:23am
Richard MacCutchan 15-Sep-22 12:21pm    
I just tried that with inline CSS and it works. Check that your CSS file is getting loaded.

1 solution

You have:

<link rel="stylesheet" href="css/styles.css" />

Please try:
<link rel="stylesheet" href="./css/styles.css" />
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900