Tell us what’s happening:
Describe your issue in detail here.
I have absolutely no idea about this step. Can I get some help please
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<style>
selector {
text-align: center;value; h1, h2, p
}
</style>
</head>
<body>
<header>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
</header>
<main>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15
Challenge: Learn Basic CSS by Building a Cafe Menu - Step 14
Link to the challenge:
Can you point us towards what phrases are terms are tripping you up so that we can be more helpful with our help?
hbar1st
September 27, 2022, 1:21pm
3
the original code presented was this:
<style>
h1 {
text-align: center;
}
h2 {
text-align: center;
}
p {
text-align: center;
}
</style>
And the instructions were:
Delete the three existing type selectors and replace them with one selector list that centers the text for the h1
, h2
, and p
elements.
What it wants is for you to combine the 3 selectors into one.
The exercise shows you the expected syntax when you combine them.
Try again to see if you can do that.
hello, try this :
Moderator edited answer out
I can’t get it, CSS dealing with me
This is what I am doing {text-align:h1, h2, p}. Where am I getting it wrong?
hbar1st
September 27, 2022, 2:21pm
7
you seem to be confused about what a selector is.
Here’s the sample code for ref:
selector1, selector2 {
property: value;
}
and here’s the original code again:
<style>
h1 {
text-align: center;
}
h2 {
text-align: center;
}
p {
text-align: center;
}
</style>
Looking at these 2 together, do you see a pattern?
Which of these (in the 2nd block) matches the words “selector1, selector2” do you think?
hi, h2 matches selector1, selector2. Is that right?
hbar1st
September 27, 2022, 2:25pm
9
yes so true!
And you can add the p to that list using a comma so
h1, h2, p are all in a list now
So what about the word “property” what goes there?
Oh okay, the word property should read text-align: right?
1 Like
hbar1st
September 27, 2022, 2:28pm
11
yes, there you go!
What does that leave? If you can try the exercise again now?
okay, can I have selector as the anchor tag before the {text-align}?
hbar1st
September 27, 2022, 2:31pm
13
not quite sure I understand. Show me what you mean?
selector{
text-align: center;h1, h2, p}. This is it?
hbar1st
September 27, 2022, 2:39pm
15
nope. Remember, what is a selector?
A selector is what tells the browser which elements you want to modify.
So you must replace the word selector with the list of the name of the elements you want to modify.
I got it my code works now, Thanks!
1 Like
Hello guys,
below is the solution to the problem.
mod edit: solution removed
they only make use of the word selector for example purpose.
pls guys try to avoid copy and paste from the questions sometimes .
hbar1st
September 28, 2022, 2:55am
18
hello,
I think you are new to the forum, so you may not know that we don’t like to share solutions to fCC challenges on here. We encourage everyone to share tips/hints/guides but not solutions.
I’ve edited your post to remove the solution.
Thanks for your understanding.
1 Like
Oh am so sorry, i don’t know.
thanks
system
Closed
March 29, 2023, 2:56pm
20
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.