Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Foundations Values and Units Numeric and Textual Data Types

Hi I have the question: Using a percentage, make the paragraph half its current with. I am using width: 50%;

Hi -

I am stuck.

I am using:

p {

width: 50%;

}

and its not allowing me to move forward and its asking me to check my CSS. What can I do?

Thanks

index.html
<!DOCTYPE html>
<html>
<head>
  <title>Numeric and Textual</title>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="wrapper">
        <p>
            <strong>Aesthetic post-ironic quinoa sartorial, wes anderson twee next level before they sold out fanny pack farm-to-table scenester.</strong> Godard fixie sartorial, keytar bicycle rights gluten-free odd future 8-bit mustache cred. Cred bushwick street art leggings fap DIY. 8-bit fanny pack quinoa vinyl art party jean shorts. Fingerstache, biodiesel kale chips narwhal pinterest tofu echo park pour-over fap raw denim craft beer. Truffaut raw denim, pop-up PBR pork belly mustache food truck cred carles synth. DIY sustainable craft beer, polaroid leggings messenger bag lo-fi twee. Keffiyeh thundercats semiotics, kogi officia tattooed gastropub viral ut skateboard street art.
            <a href="#">Read more &raquo;</a> 
        </p>
    </div>
</body>
</html> 
style.css
/* Write your CSS below */body {

font: normal 1.em/1.5 sans serif;
padding: 2em 0;

}

div {

width: 800px;
padding: 2em;
margin: auto;
margin-top: -8em;
background-image: url(" bg.jpg");

}

p {

color: red;
}

a {

color: inherint;

}

strong {

color: initial;

}

div: after {

content: "A string is cool";
font-size: 1.53m;
color: blue;

}

p {

width: 50%;

}

1 Answer

You have a lot of CSS code that doesn't seem to be part of the code-challenge, and you have some syntax errors as well. Either of these might be causing the code-challenge not to pass.

Here is the CSS when I tried:

strong {
 color: initial;
}

div.wrapper {
  background-image: url('img/bg.jpg');
}

p {
  width: 50%;
}

Try that.

Your right, it was too much code.

Thank you!