css heading background line

Solutions on MaxInterview for css heading background line by the best coders in the world

showing results for - "css heading background line"
Isaure
13 Jul 2020
1h1 {
2    position: relative;
3    font-size: 30px;
4    z-index: 1;
5    overflow: hidden;
6    text-align: center;
7}
8h1:before, h1:after {
9    position: absolute;
10    top: 51%;
11    overflow: hidden;
12    width: 50%;
13    height: 1px;
14    content: '\a0';
15    background-color: red;
16}
17h1:before {
18    margin-left: -50%;
19    text-align: right;
20}
21.color {
22    background-color: #ccc;
23}
Debora
17 Mar 2016
1<!DOCTYPE html>
2<html lang="en">
3
4<head>
5  <meta charset="utf-8">
6  <title>HTML</title>
7  <link rel="stylesheet" href="main.css" type="text/css" />
8</head>
9
10<body>
11  <div id="wrapper">
12    <div class="line"></div>
13    <div class="textbox">
14      <div class="text">This is my Title</div>
15    </div>
16  </div>
17</body>
18
19</html>