Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I replicate this effect in CSS?

Tags:

html

css

enter image description here

https://i.sstatic.net/2JMTB.png

The portion to the right of Who with the ----------

Is it a background to the li? I'm really drawing a blank as how to create something like that.

like image 711
Doug Smith Avatar asked Jan 30 '26 15:01

Doug Smith


1 Answers

Here you go mess around with this.

http://jsfiddle.net/fjZfL/3/

HTML:

<div id="box">
    <h2>who?</h2>
    <p>I am 22 Year old designer …</p>
</div>

CSS:

#box {
    width: 200px;
    height: 150px;
    background: #eee;
    padding: 0 8px;
}
h2 {
    display: inline-block;
    padding: 18px 4px 0 10px;
    margin: 0;
    background: #eee;
}
p {
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 20px 10px;
    margin-top: -10px;
}
like image 177
manish Avatar answered Feb 01 '26 10:02

manish



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!