0

So this is what the CSS SHOULD look like

  h1{
    font-family:monospace;
}

.main{
    border: solid #000000 0.1px;
    background:rgba(255,255,255,0.3);
}

And this is what shows up in my Inspect Element in Chrome

element.style {
}
user agent stylesheet
html {
    display: block;
}

4 Answers4

4

Ok, there may be many things that could go wrong but I think the most probable are two:

  1. Your browser is loading the CSS from cache. One way to test this is to add inline css to the element. If it loads, but the changes to your css file don't then what you might check is if there are Expires headers in your .htaccess. In any case the first thing you can do to check if this is the case is to open your Chrome developer tools, go to the Network tab, check the Disable cache option and refresh the page.

  2. If the problem doesn't get fixed with the previous observation you should probably check your CSS, something might be incorrectly written, in a media query that doesn't apply or maybe some semicolon got wild and hid between the lines. It happens.

Mihail Minkov
  • 2,463
  • 2
  • 24
  • 41
0

0.1px not gonna work (only show for firefox as firefox change it to 1px).

Try this:

.main{
    border: solid #000000 1px;
    background:rgba(255,255,255,0.3);
}
Community
  • 1
  • 1
Dalin Huang
  • 11,212
  • 5
  • 32
  • 49
0

There is nothing wrong with your CSS see the fiddle


border: solid #000000 0.1px;

0.1px is just working, but aint 0.1px it will be set to 1px.


Or your CSS is unable to be found, or some other CSS is overwritting/resetting it.

Can you link the url or make a jsfiddle yourself ? So i can inspect it.

SurudoiRyu
  • 321
  • 1
  • 9
0

Simply use: ctrl + shift + R if your CSS properties is not or partially showing in inspect Chrome browser