HEADER ADS 728X90

How To Use CSS Position Property and Explain | CSS Tutorial || BY CodePrime

css tutorial,css tutorial for beginners,css,html css tutorial,html tutorial,tutorial css,html and css tutorial for beginners,html and css tutorial,html css,tutorial,tutorial de css,css tutorial hindi,simple css tutorial,css beginners tutorial,css grid,css html tutorial in hindi,css crash course,web development tutorial,css for beginners,html5 tutorial,css tutorial w3,css tutorial ita,bem css tutorial,css3 tutorial,css selectors,css position property,css position absolute,css position,css position sticky,css position fixed,css position tutorial,css positioning,css positioning tutorial,css position static,css,css position relative,position in css,fixed position in css,relative position in css,css position property tutorial,css position propery,position property in css with example,css position explained,position static css,css relative position,position,position css,CSS-Tutorial,Latest-Posts,How To Use CSS Position Property and Explai,css advance tutorial,css basic tutorial,css position, relative position,absulate position,fixed position,sticy position,codeprime, coding tutorial, how to learn coding easy way to learn coding

Hi dear welcome to "CodePrime" Blog . In this post we are going to learn how to use css position property. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat style.css file Then Copy The CSS CODE and pest it then open the index.html file with your browser.

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS Position Property</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>

    <div class="title">CSS Position Property</div>

    <div class="container">
        <div class="position-1"></div>
        <div class="position-2"></div>
    </div>

   

</body>
</html>

CSS

 *{
    font-family: sans-serif;
}

body{
    min-height: 500vh;
}
.title{
   font-size: 2rem;
   background: linear-gradient(45deg,#f09, #111);
   padding: 5px 10px;
   text-align: center;
   color: #fff;
   margin-top: 20px;
   text-transform: uppercase;
}

.container{
    /* position: relative; */
    /* position: absolute; */
    /* position: fixed; */
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 3px #ccc;
    margin: 30px 30%;
    width: fit-content;
}
.container .position-1 {
       /* position: relative; */
    /* position: absolute; */
    /* position: fixed; */

    width: 200px;
    height: 200px;
    border-radius: 5px;
    background: #090;
    margin: 10px;
}
.container .position-2 {
       /* position: relative; */
    /* position: absolute; */
    /* position: fixed; */
   
    width: 200px;
    height: 200px;
    border-radius: 5px;
    background: #f09;
    margin: 10px;

}

Youtube Tutorial

FLOW US ON SOCIAL MEDIA

Post a Comment

0 Comments

Join Telegram