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

Simon Pfister
seal-mask
.a{fill-rule:evenodd;}techdegree
Simon Pfister
Front End Web Development Techdegree Student 5,642 Points

How can I make space between label and textarea with the only CSS property

my label from the Text area will not move up that I will have a space between them. I tried with margin and padding but it not working

Sam Gord
Sam Gord
14,084 Points

hi Simon, can u please show me some of your code? i think i might be able to help ;)

1 Answer

Sam Gord
Sam Gord
14,084 Points

ok, your textarea has an id of topic, right? if u just give that id a margin top of any value it will be accepted and you'll have the desired space between the label and textarea.

like this :

#topic{
  margin-top: 20px
}

it already has a margin bottom of 10px too.

hope it helps.

happy coding ;)