Tell us what’s happening:
Describe your issue in detail here.
Guys, please help me I am stuck on this code here. Thank you
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cafe Menu</title>
<!-- User Editable Region -->
<style> element {text-align
property: value;center<h1>CAMPER CAFE</h1>
}
</style>
<!-- User Editable Region -->
</head>
<body>
<main>
<h1>CAMPER CAFE</h1>
<p>Est. 2020</p>
<section>
<h2>Coffee</h2>
</section>
</main>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Learn Basic CSS by Building a Cafe Menu - Step 11
system
December 23, 2023, 1:44pm
2
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
ILM
December 23, 2023, 2:57pm
3
this is not how css is written, I would carefully read again the description, and slowly try again, If there is something you don’t understand of the description, let us know
I have tried that for hours until now I still haven’t figured out what I am supposed to write. help please
ILM
December 23, 2023, 3:03pm
5
the example
element {
property: value;
}
if the element you want to apply the css to is an a element you write
a {
}
and write the css properties inside the graph parenthesis
How should I write this css code then?
Step 11
You can add style to an element by specifying it in the style element and setting a property for it like this:
element {
property: value;
}
Center your h1 element by setting its **text-align** property to the value center.
ILM
December 23, 2023, 3:09pm
7
start by creating the h1 rule, similar to the generic example, and to my example with the a element
This is how I wrote it, still not accepting my code
<style><h1>a{
property:text-align value;center
}</h1>
</style>
<style><h1>a{
property:text-align value;center
}</h1>
</style>
ILM
December 23, 2023, 3:15pm
10
yeah, that’s totally wrong
a { }
is for the a element, if you do it for the h1 element you do not write a, and also you do not write html tags in css
Nah, this one is tough. I give up! How would you write the code? Can you please share how?
ILM
December 23, 2023, 4:48pm
12
I will not share the code, but please try again
I would write like this for an img element, a main element and a figure element:
img { }
main { }
figure { }
so please try again writing for an h1 element
1 Like
Then you have not helped me. Thank you
ILM
December 24, 2023, 11:26am
14
You put the name of the element, in your case it’s h1 then open the graph parenthesis { then close it }, in this way you create the h1 rule, without putting any properties inside, but that’s what you need to do first, if you don’t create the rule, you can’t apply the properties
1 Like
system
Closed
June 23, 2024, 11:26pm
15
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.