-1

Here is the HTML and CSS. I don't know where is the problem and why there is no effect.

#1st_column {
  background-color: #181818;
  width: 20%;
  display: block;
  margin-left: 15px;
  height: 800px;
}
<div id="1st_column">
  <h1 id="pop">
    POPULAR <br /> CLASSES
  </h1>
  <p>
    Why not give one of <br /> these popular classes<br /> a look?
  </p>
</div>
JJJ
  • 32,902
  • 20
  • 89
  • 102
mego
  • 9
  • 1
  • 1
  • 1

2 Answers2

0

ID's shouldn't start with a number, as it seems browser's don't fully support them yet.

#first_column {
  background-color: #181818;
  width: 20%;
  display: block;
  margin-left: 15px;
  height: 800px;
}
<div id="first_column">
  <h1 id="pop">
    POPULAR <br /> CLASSES
  </h1>
  <p>
    Why not give one of <br /> these popular classes<br /> a look?
  </p>
</div>

Edit

To use ID's starting with a number, you can do so as shown in this answer;

https://stackoverflow.com/a/5672936/19068

<div id="12"></div>

#\31\32 {
    background: #0bf;
}

Each number in the ID must be escaped using \3.

Personally, I wouldn't bother. It's ugly and just because you can do something doesn't mean you should.

Community
  • 1
  • 1
Tom
  • 4,257
  • 6
  • 33
  • 49
0

This should work.

More info about it here : can i have a div with id as number?

#\31\st_column {
  background-color: #181818;
  width: 20%;
  display: block;
  margin-left: 15px;
  height: 800px;
}
<div id="1st_column">
  <h1 id="pop">
    POPULAR <br /> CLASSES
  </h1>
  <p>
    Why not give one of <br /> these popular classes<br /> a look?
  </p>
</div>
Community
  • 1
  • 1
Aslam
  • 9,204
  • 4
  • 35
  • 51