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

Css

CSS

Challenge task 3 of 3

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

/* Write your CSS below */ strong{ color:initial; }

div{ width:700px; padding:2em; margin:auto; background-image:url("bg.jpg"); }

p { /color: red;/

width: 50%; font-size: 75%; }


/* Write your CSS below */
strong{
color:initial;
}

div{
width:700px;
  padding:2em;
  margin:auto;
  background-image:url("bg.jpg");
}

p {
  /*color: red;*/

  width: 50%;
  font-size: 75%;
}
geoffrey
geoffrey
28,736 Points

I edited your post, try to format correctly your code, using markown, it makes your post more readable and that helps people to give you some hints on the way to solve the issue you have.

In this case I see some css badly formatted at the top, you should remove it.

I mean you should remove this

p { /color: red;/

width: 50%; font-size: 75%; }

You wrote the same code at the bottom but this time, It's corrcetly written. Keep it and that should work.

1 Answer

we have this settled, my colleague Stefan Claudiu solved the problem last night Stefan Claudiu Tiulea Remove width: 700px; from your div. If I'm not mistaken, p inherits the values from its parent (the div), and the 50% Represents the value of que div, not the standard value ...

Thank you

Ary,