CSS CSS Layout Basics Getting Started with CSS Layout Layout Wrapper Challenge

Greg Stephen
Greg Stephen
11,600 Points

Having trouble setting width of container

Can’t figure out why my code does not work.

.container{ width = 80%; margin = 0 auto; }

It says that I did not set my width.

<!DOCTYPE html>
    <title>Getting Started with CSS Layout</title>
    <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
    <div class="container">
            <h1>Best City Guide</h1>

        <div class="main">
            <p>Dessert toffee chocolate lollipop fruitcake cake sweet. Pudding cotton candy chocolate pudding liquorice jelly marzipan. Muffin gummies topping lollipop. Caramels chocolate cake donut liquorice.</p>
            <p>Cake sesame snaps sweet tart candy canes tiramisu I love oat cake chocolate bar. Jelly beans pastry brownie sugar plum pastry bear claw tiramisu tootsie roll.</p>

            <p>&copy;2015 Residents of The Best City.</p>
/* Complete the challenge by writing CSS below */
  width = 80%;
  margin = 0 auto;

1 Answer

Max S.
Max S.
4,831 Points


Your CSS is not written properly. please check I have rewrite your CSS code and compare that with your code.

.container{ width: 80%; margin: 0 auto; }


Greg Stephen
Greg Stephen
11,600 Points

Thanks! I shouldn’t have started working before my coffee this morning haha

Max S.
Max S.
4,831 Points

Hahaha .... No worries it happens sometime :)