HTML CSS examples for CSS Widget:Header
Creating headers with horizontal line across
<html> <head> <style> h1 {<!-- w w w .java 2s .com--> position: relative; text-align: center; font-size: 1em; } h1:before { position: absolute; content: ''; height: 2px; background: #F00; display: block; width: 100%; top: 0.6em; z-index: -1; } </style> </head> <body> <h1>Heading</h1> </body> </html>