Styles from my index.css work incorrectly. More precisely, the styles specified by the standard HTML tags work, but, for example, I have id #contacts and the styles specified for it are not displayed even in chrome styles.

Here is the code: bootstrap connection

 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"> 

Connection index.css (below a couple of lines)

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

PS! Important does not help Example index.html

 <footer style="background-color: aqua;"> <div class="container" id="contacts"> <div class="row"> <div class="col-md-6 col-sm-4"> <img border="0" src="resourses/ico-pntu.ico" alt="logo_univer"> </div> <div class="col-md-6 col-sm-8"> <ul> <li style="list-style-type:none; text-align: center;"><h4>Контакти</h4></li> <li><strong>АДРЕСА:</strong> м. Полтава, Першотравневий проспект, 24. Корпус Ф, к.121, 122, 123</li> <li><strong>ТЕЛ:</strong> (053)227-38-57</li> </ul> </div> </div> </div> </footer> 

Example index.css

 #contacts { font-family: monospace !important; } 

as a result, the font in the c id contacts does not change

  • Wang ??? Model your problem. Make a sample code on jsfiddle.net , Yes, you can do it yourself (you can place your sample code) A mistake can be a trivial typo in your styles - Andrew ProjectSoft
  • please hold on - mara1esh
  • What's this? take.ms/UPHff - Andrew ProjectSoft
  • Add your entire index.css file to the question, to love there is a typo. - Klimenkomud
  • Here you are the whole index.css body{ background-color: white; } .main-nav{ position: relative; } .shadow img{ margin: 50px; } footer{ background-color: aqua; } #contacts{ font-family: monospace;!important; } body{ background-color: white; } .main-nav{ position: relative; } .shadow img{ margin: 50px; } footer{ background-color: aqua; } #contacts{ font-family: monospace;!important; } body{ background-color: white; } .main-nav{ position: relative; } .shadow img{ margin: 50px; } footer{ background-color: aqua; } #contacts{ font-family: monospace;!important; } - mara1esh

1 answer 1

Well I say - typos. Remove the asterisks.
Alt text

  • This is what I tried in the editor to highlight ID in bold. Heh, they are not in the source. Sorry for misleading - mara1esh
  • Strange. Anyway, somewhere a typo crept in. Although I used the full copy-paste of your code jsfiddle.net/vjdsLygc - Andrew ProjectSoft
  • that's just what's interesting, in this project, standard tags work with a bang, and my classes or IDs are not. #contacts is not an isolated case - mara1esh
  • @ mara1esh if possible, give a link to the patient. And that is just the guesswork of the coffee grounds. - Andrew ProjectSoft
  • It is not the answer to the question. To leave your comments or ask the author to clarify, leave a comment to the appropriate post. - From the queue of checks - andrybak