LevelChart8
LevelChart8

Reputation: 207

CSS style not applying as expected (Haskell project)

I have this code:

elAttr "h1" ("class" =: "content") $ text "Welcome to the app!"

Which is supposed to reference this style:

.content h1 {
 font-size: 2em;
 margin-bottom: 0.5em;
}

But the h1 style is not being applied.

What am I doing wrong?

EDIT: Here is how my HTML is rendered:

enter image description here

Upvotes: 0

Views: 64

Answers (1)

Sameera Herath
Sameera Herath

Reputation: 201

Is that showing like,

<h1 class="content">Welcome to the app!</h1>

If it is like this above example, try this

h1.content{
  font-size: 2em;
  margin-bottom: 0.5em;
}

or just .content

Upvotes: 2

Related Questions