-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"/>
isherwood
  • 58,414
  • 16
  • 114
  • 157
Lexie
  • 1
  • 1
  • 1

3 Answers3

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

mdln97
  • 144
  • 1
  • 9
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.

narypigeon
  • 103
  • 1
  • 10
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.

  • 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? – Lexie Jan 23 '19 at 00:35
  • Please check https://stackoverflow.com/questions/41502863/xampp-server-does-not-load-css-files/41502889 maybe that would help – Miguel Ballén Jan 23 '19 at 15:49