-1

I'm linking my .CSS file and Bootstrap 4.2.1 to my HTML file. The .CSS Isn't linking correctly. What is the correct way to link my stylesheet to an HTML file? Bootstrap works but not CSS.

I have tried changing the order of the links. I have also made sure my HTML and CSS files are in the same folder

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" href="style.css"/>
1
  • Is your stylesheet in the right path? Commented Jan 22, 2019 at 1:55

3 Answers 3

1

you wrote stlye instead of style? maybe it's just the mispelling or you might need to specify the path for your css something like this before your css file ~/filename.css

Sign up to request clarification or add additional context in comments.

1 Comment

thank you for the spelling catch but that did not work :(
0

<link rel="stylesheet" href="stlye.css"/> should be <link rel="stylesheet" href="style.css"/> You spelt style wrongly. Also make sure style.css is in the same folder/path as your index.html (or whichever .html page you are using), else be sure to specify the path like so: /example/style.css.

Comments

0

Check that the style file exists and you are importing your stylesheet with the correct name and relative path. That means use <link rel="stylesheet" href="style.css"/> if your css is in the same folder of your html file. Otherwise provide the correct route for your file. For example would be <link rel="stylesheet" href="./app/assets/style.css"/> if your css is inside app/assets folder.

2 Comments

I have my index.php and style.css in the same folder. What else can i try? Does it have something to do with xampp?
Please check stackoverflow.com/questions/41502863/… maybe that would help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.