Gyancode

A free library of HTML, CSS, JS

Search This Blog

Thursday 23 February 2017

Border Design Css with Before & After Css

<!DOCTYPE html>
<html>
<style>
    .titlehome {
        font-size: 24px;
        line-height: 24px;
        text-align: center;
        padding: 7px 15px 10px 15px;
        color: #000;
        font-weight: bold;
        margin-bottom: 10px;
        position: relative;
        z-index: 1;
        font-family:Verdana, Geneva, Tahoma, sans-serif;
    }

        .titlehome span {
            color: #000;
            text-align: center;
            background: #fff;
            padding: 0 50px;
        }

        .titlehome:before {
    border-top: 1px solid #f67519;
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 3%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 150px;
    z-index: -1;
}
        .titlehome:after {
    border-top: 1px solid #f67519;
    content: "";
    margin: 0 auto;
    position: absolute;
    top: 90%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 150px;
    z-index: -1;
}
</style>
<body>
    <div class="titlehome"><span>Border  Design Css with Before & After Css</span></div>
</body>

</html>


No comments :

Post a Comment