Thursday, January 13, 2022

Navigation with logo

 Navigation with logo

 


<!DOCTYPE html>

<html>


<head>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="STYLESHEET" type="text/css" href="web.css">

    <title>web design</title>

</head>


<body>

    <div class="header">

        <a href="#" class="logo">CompanyLogo</a>

        <div class="header-right">

            <a href="#" class="acive">Home</a>

            <a href="#">Contact</a>

            <a href="#">Aboutus</a>

        </div>

    </div>

    <div style="padding:20px;">

      <h1>Responive logo </h1>

      <p>Resize the brower windows to see the effect</p>

    </div>

</body>


</html>


CSS Navigation with logo Style

 body{

    margin:0;

    font-family: Arial, Helvetica, sans-serif;

}

.header{

    overflow: hidden;

    background-color:#f1f1f1;

    padding:20px 10px;

}

.header a{

    float: left;

    color: #000;

    text-align: center;

    padding:12px;

    text-decoration: none;

    font-size:18px;

    line-height:25px;

    border-radius: 4px;

}

.logo{

    font-size:25px;

    font-weight: bold;

}

.header a:hover{

    background-color: #ddd;

    color: #000;

}

 .active{

    background-color: dodgerblue;

    color: white;

}

.header-right{

    float: right;

}

@media screen and(max-width:500px;) {

    .header a{

        float: none;

        display: block;

        text-align: left;

    }

    .header-right{

        float: none;

    }

}

No comments:

Post a Comment

JavaScript Animated

  JavaScript Animated <!DOCTYPE html> <html> <style> #myContainer {   width: 400px;   height: 400px;   position: relative;...