-2

I have two html code snippets:

#header {
  text-align: center;
  font-size: 14px;
  font-family: "Gill Sans MT";
  margin-top: 30px;
}

#123 {
  text-align: center;
  font-size: 14px;
  font-family: "Gill Sans MT";
  margin-top: 30px;
}
<div id="header">
  <!-- *** Section 1 *** --->
  <h3>Time series of applications to 'Research Grants (Open Call)' for this Financial Year<br> and the previous three with 'Bollinger Bands'.</h3><br>
</div>

<div id="123">
  <!-- *** Section 1 *** --->
  <h3>Time series of applications to 'Research Grants (Open Call)' for this Financial Year<br> and the previous three with 'Bollinger Bands'.</h3><br>
</div>

Exactly the same content, but with different IDs.

Now, only the header ID works, the 123 doesnt.... and if I put the 123 css ABOVE the header css, none of them work.

Can someone explain what is happening, cos I am stumped!

Satpal
  • 132,252
  • 13
  • 159
  • 168
Nicholas
  • 3,517
  • 13
  • 47
  • 86
  • ^ [What are valid values for the id attribute in HTML?](https://stackoverflow.com/questions/70579/what-are-valid-values-for-the-id-attribute-in-html) is not a duplicate, numerical ids are valid. – JJJ Nov 28 '17 at 12:27
  • It is NOT a duplicate. The 123 was just an example. It could be any value, it still does not work. – Nicholas Nov 28 '17 at 12:27
  • I have create a snippet for you, use some other id and try to reproduce the issue – Satpal Nov 28 '17 at 12:28
  • Please show your actual HTML and CSS. If you show imaginary code, you get solutions for the imaginary problem. – JJJ Nov 28 '17 at 12:28
  • in the snippet here, numerical id doesn't work, so use another id and it will work – Temani Afif Nov 28 '17 at 12:35
  • Hey, I am posting a new question with my FULL code. Hopefully that is more helpful! :) – Nicholas Nov 28 '17 at 12:37

1 Answers1

-1

An id must begin with an alphabet [a-zA-Z]. This explains why 123 is not working.

Try changing id. Also, are you using some other framework like bootstrap?

Kartik Sharma
  • 723
  • 8
  • 19