Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Foundations Values and Units Numeric and Textual Data Types

stage 4 challenge 3

Using a percentage, set the paragraph to half of its current width.

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 */
strong{
  color:initial;
}
div{
width:700px;
  padding:2em;
  margin:auto;
  background-image:url("bg.jpg");
}
p{
width:75%;
}

From what I see at a first glance, I guess half means 50%, not 75%.

5 Answers

50% yaeh but its not working tho.need to check the length unit donnoe wc chek unit now

If you write your code, the way you write your comments I might have a clue as to what's going on :-P

its not working again

am trying this p{ width:50%; } check the length unit in your CSS thus di results

cant figure out where the error is???

Tim Knight
Tim Knight
28,888 Points

I'm sorry that you're still struggling with this question after so long.

I've reviewed the quiz and you're definitely on the right track with everything.

The correct answer to set the paragraph to half is in fact 50%.

p {
  width: 50%;
}

What's causing your error however is the width you're setting on the div. The only think you need to set on the div is the background-image, anything else might cause an error in other challenges.

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