Reputation: 37
I want to create a heading for widgets. The heading will have an equal or parallel bottom border. How its possible? any quick ideas. Attached is what i want to achieve.
the second heading is the heading that I'm working on now. but i want to look it like above 1st pcture.
Hope, you understood that i am looking for paralleled border that is equal to heading and extends the width of heading."
Thank you folks! i got the answer! I'm not going to use span after h1 because it just increases the tag but "display:inline-block;" seems perfect to me.
Upvotes: 0
Views: 1802
Reputation: 65
Try this css:
h1{
border-bottom:3px solid black;
padding-bottom: 5px;
width:200px;
}
Upvotes: -1
Reputation: 22992
Wrap it in a span
.
h1 span {
text-transform: uppercase;
padding: 20px 0;
font-weight: 100;
border-bottom: 1px solid black;
}
<h1><span>statistics</span></h1>
Upvotes: 2
Reputation: 13997
h1{
font-size: 25px;
display: inline-block;
border-bottom: 1px solid black;
padding-bottom: 25px;
text-transform: uppercase;
}
Upvotes: 2
Reputation: 21050
H1 {
display: inline-block;
border-bottom: 1px solid #000;
padding: 0 0 10px;
margin: 0;
}
Upvotes: 0
Reputation: 14348
try this http://jsfiddle.net/e4s8qo5q/
<h1>STATISTICS</h1>
h1{
line-height:50px;
border-bottom:1px solid;
}
Upvotes: -1