Skip to main content

CSS Tutorial 19

 <!DOCTYPE html>

<html lang="en">


<head>

    <meta charset="UTF-8">

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

    <title>Height, width, border and background. </title>

    <style>

        #firstpara {

            background-color: red;

            height: 100px;

            width: 200px;

            border-radius: 11px;

            border: green 3px solid;

        }


        /* border-color: green;

    border-style: solid;  

    border-width: 3px;} */

        #secondpara {

            height: 100px;

            width: 200px;

            background-color: lightcoral;

            border-left: red 3px solid;

            border-right: darkorchid 5px solid;

            border-top: green 8px solid;

            border-bottom: darkblue 2px solid;

            border-top-right-radius: 2px;

            border-top-left-radius: 5px;

            border-bottom-right-radius: 7px;

            border-bottom-left-radius: 11px;

        }


        #thirdpara {

            height: 500px;

            width: 500px;

            background-image: url(RCoder.JPG);

            border: red 2px solid;

            background-repeat: no-repeat;

            background-position: top left;

            /* background-position: center left; */

            /* background-position: bottom right; */

            /* background-position: left left; */

            background-position: center;

        }

    </style>


</head>


<body>

    <h2>This is Heading.</h2>

    <p id="firstpara">This is paragraph.</p>


    <h2>This is Heading.</h2>

    <p id="secondpara">This is paragraph.</p>


    <h2>This is Heading.</h2>

    <p id="thirdpara">This is paragraph.</p>


    <h2>This is Heading.</h2>

    <p id="fourthpara">This is paragraph.</p>


</body>


</html>

Comments

Popular posts from this blog

Side Navigation Bar CSS

 *{     background-color: #353b48; } body{     margin: 0px;     padding: 0px;     font-family: cursive; } .navbar{     position: absolute;     top: 50%;     transform: translateY(-50% ); }      .navbar a{     text-decoration: none;     display:block;     margin: 8px 0px;    padding: 8px;    width: 130px;    font-size: 22px;    /* background-color: #e74c3c; */    color: white;    margin-left: -100px;    border-radius: 10px;    transition: 0.6s; } .navbar a:hover{     margin-left: 0px; }

Web 2 Sign in

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Sign Up window</title>     <style>         * {             box-sizing: border-box;         }         body {             /* justify-content: center; */             /* align-items: center; */             margin: 0px;             padding: 0px;             font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;             color: black;             background-color: #e9faff;         }         .cont {   ...

Side Navigation Bar 1

 <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Document</title>     <link rel="stylesheet" href="style.css"> </head> <body>     <div class="navbar">         <a href="#" style="background-color: #27ae60;">Home</a>         <a href="#" style="background-color: #c0392b;">About</a>         <a href="#" style="background-color: #ba21d8;">Gellary</a>         <a href="#" style="background-color: #2980b9;">Contact</a>     </div> </body> </html>