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

What is the best way to draw this?

What is the best way to draw this in css?

alt text

2 Answers

<div id="first-div">
    <div id="second-div">
          <p>LET'S TELL YOUR STORY</p>
    </div>
</div>
#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?

Of course.

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

Thank you so much!!!

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

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

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