[Help] - CSS: Typography - 3. Font Weight - I added font-weight into .banner p, but it don't work


#1

At lesson CSS: Typography - 3. Font Weight

https://www.codecademy.com/courses/learn-css-typography/lessons/css-typography/exercises/font-weight-i?action=lesson_resume&course_redirect=learn-css

We have instructions:
Taking a look at the web page in the browser, you’ll notice a “Banner” section, the blue section right below the navigation menu.

In style.css, in the banner section of the stylesheets, set the font weight of the paragraph within class banner to bold. You’ll notice that the letters in the paragraph in the web page thicken.

The css Section
/* Banner Section */

.banner {
background-color: blue;
padding: 100px 0;
margin-top: 77px;
text-align: center;
}

.banner p {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
padding: 10px;
color: #ffffff;
}

I added font-weight into .banner p, but it don’t work

.banner p {
border-top: 1px solid #fff;
border-bottom: 1px solid #fff;
padding: 10px;
color: #ffffff;
font-weight: bold;
}

I don’t know if I understand that right?
Please help me!


#2

Does the challenge pass if you removed the first css rule .banner p {...}

@designace60665 I was able to run the task just now with one css rule
under the /*Banner Section*/ :+1:

Try resetting the challenge and adding the css declaration again to .banner p {...}


#3

Thank you, but i think this bug, because when i try to adding the css into p tag below
p {
font-weight: bold;
}
then it run passed. Although, the instructions is set the font weight of the paragraph within class banner to bold.


#4

I believe that because the css rule was inclusive it was able to pass the task, however you are right it was asking for specificity :wink:

This is something you can share with bug reporting, within the webpage of the issue, open a ticket and describe the problem and share the link to this forum post as well :+1:


#5

Same problem, no matter what I do the code just won’t run.
I tried in the html paragraph section, i added font-weight:bold; to .banner p{} , to the paragraph only selector p {} even gave the paragraph an id in the html and then set it to bold in css. Nothing works. I’ve reported bug but can’t move on.


#6

I solved it by add font-weight: bold; property into selector p { }. As below:
p {
font-weight: bold;
}

Instead of adding in the .banner p { }.


#7

I can’t solve it, no matter what I do :frowning:

Tried typing individually:

.banner p {
font-weight: bold;
}

p {
font-weight: bold;
}

Adding “font-weight: bold;” to the pre-existent selectors does not work either…


#8

nope, doesn’t work. I tried that already.


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.