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-top at bottom-border?

Hey i have a bottom border on my website using this code

:root {
    font-family: 'Roboto Slab', serif;
    min-height: 98%;
    border-bottom: 40px solid #008B8B;
    border-top: 10px solid #007D7D;
}

but how can i make a top border on the bottom border?

any ideas?

// erdrag

Pierre Smith
Pierre Smith
11,842 Points

I don't quite get what you are trying to do.

Can you please restructure your question.

Yes ofcourse, at the bottom of my page i have a green colored border, and on that border i want a small slightly darker green border, at the top of it, but i cant figure out how

http://codepen.io/anon/pen/PwWdKY

// erdrag

robertm
robertm
13,570 Points

Are you asking for two borders on top of each other?

yeah like a top border, on the bottom border:)

2 Answers

Pierre Smith
Pierre Smith
11,842 Points

hmm. i'm not sure whether you can do it in the manner you're thinking... To my knowledge you can only set the bottom border once. So in order to seemingly add a second colour to the bottom border you might have to set the colour to an element placed on top of the bottom border.

Mark Shaw
Mark Shaw
10,449 Points

What element is the border applied to?

:root { font-family: 'Roboto Slab', serif; min-height: 98%; border-bottom: 40px solid #008B8B; border-top: 10px solid #007D7D; }