user3368859
user3368859

Reputation: 1

How to add text into Solid Border Bottom?

I've been put in charge of redesigning our communities Sponsor page, Currently this is what it looks like, http://core2062.com/sponsors/ and now I've redesigned it using Flexboxes: https://diedrich.co/img/uploads/de9ea0e2569a8051f8703c99d637f85b.jpg

My question is...How do I Put text in the bottom border I created around each image?

Upvotes: 0

Views: 1456

Answers (2)

Ex-iT
Ex-iT

Reputation: 1477

You can't put text in a border.

You can either make an element with a background color and put the text in that or absolute position the text on top of the border.

Upvotes: 0

Paulie_D
Paulie_D

Reputation: 114991

You can't put text in a border. Use a background color on the element holding the text and apply a border(if required) to that

Demo

HTML

<div class="border">
    <h1>Diamond Sponsors</h1>
</div>

CSS

.border {
    background-color: black;
    color:white;
    border-top:5px solid orange;
    text-align:center;
}

Upvotes: 2

Related Questions