Learn Basic CSS by Building a Cafe Menu - Step 25

Hiya! Each time I go to add the margin-left and margin-right lines to center the div, one of these lines never seems to “work” (when the line of code turns the appropriate color, such as red or blue, this is how I know it took, so to speak).

I’ll type the code out just like every other line, yet it doesn’t seem to register. Am I doing something wrong, or is this a fluke issue?

Here is a photo of my code in the program. Is this formatted properly? It feels like it is formatted correctly, but for some reason will not work.

Please let me know if I am just making a silly mistake!


Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cafe Menu</title>
    <link href="styles.css" rel="stylesheet"/>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
/* file: styles.css */
body {
  background-color: burlywood;

h1, h2, p {
  text-align: center;

/* User Editable Region */

div {
  width: 80%;
  background-color: burlywood;
  margin-left: auto

/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 25

Link to the challenge:

you forgot to add ; at the end of each auto

1 Like


Thank you so much! Figured it was a silly thing I was doing. I was stuck on this for way too long, should’ve realized that!

1 Like

I’m glad i could help you with your problem

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