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!

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


What is the best way to draw this?

What is the best way to draw this in css?

alt text

2 Answers

Adrian Zamfir
Adrian Zamfir
13,529 Points
<div id="first-div">
    <div id="second-div">
          <p>LET'S TELL YOUR STORY</p>
#first-div {
     background-image:url( green line image)

#second-div {
    background-color: white;
    color: green;
    border: 1px solid green;
    font-family: "your-font";

Hope this helps you.

No way to do this without image?

Adrian Zamfir
Adrian Zamfir
13,529 Points

Of course.

<div id="one">
<div id="two">
#one {
    border-bottom: 1px solid green;
/* pull the div up with negative margins*/
#two {
    /*rest of the css*/

Thank you so much!!!

<div class="divider">
    <span class="divider-heading">LET'S TELL YOUR STORY</span>
.divider {
    border-bottom: 1px solid aqua;
    text-align: center;

.divider-heading {
    border: 1px solid aqua;
    position: relative;
    bottom: -.7em;
    background: white;
    color: aqua;
    font-size: .75em;

source : http://codepen.io/johnweland/pen/pcHoq view : http://codepen.io/johnweland/full/pcHoq/