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

border not working HELP!!!

MY border is not working.

header {
background: #ffc0cb;
border-color: deeppink;
float: left;
margin: 0 0 30px 0;
padding: 5px 0 0 0;
width: 100%;
}

thanks imogenherbert

Jesse, header is an HTML tag (like h1, p, or a), so there's no need to make it a class or id. The problem is elsewhere - see my answer below.

Greg's right, my HTML5-fu is weak :) Thanks, Greg!

No problem! I have the distinct advantage of only having just started to learn HTML, so the new-fangled stuff is all I know :)

1 Answer

Hi imogenherbert,

You need to actually add a border to your header! Right now, you're just specifying the color, but no width or style. There are a couple ways to do this; here's the shortest:

header {
    background: #ffc0cb;
    border: 1px solid deeppink;  /* Here, I've specified width, style, and color */
    float: left;
    margin: 0 0 30px 0;
    padding: 5px 0 0 0;
    width: 100%;
}

The long version is this:

header {
    background: #ffc0cb;
    border-width: 1px;
    border-style: solid;
    border-color: deeppink;
    float: left;
    margin: 0 0 30px 0;
    padding: 5px 0 0 0;
    width: 100%;
}

hi Greg Kaleka

thank you all working fine

imogenherbert

imogenherbert Can you show us how you have the header "coded" in the actual HTML itself? Maybe give us the actual lines so we can be 100% sure what we're looking at?

Greg Kaleka

can you help me with my "code challenge problem" please

imogenherbert