Justify items and self

 HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <link rel="stylesheet" href="justify.css">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Properties</title>
</head>
<body>
    <div id="outer">
        <div id="one" class="inner">1</div>
        <div class="inner">2</div>
        <div class="inner">3</div>
        <div class="inner">4</div>
        <div class="inner">5</div>
        <div class="inner">6</div>
        <div class="inner">7</div>
    </div>
</body>
</html>

CSS

#outer{
    height: 500px;
    width: 500px;
    border: 2px solid black;
    background-color: antiquewhite;
    display: grid;
    grid-template-rows: repeat(3,1fr);
    grid-template-columns: repeat(3,1fr);
    grid-gap: 10px;
    /* justify-items:start */
    /* justify-items: end; */
    justify-items: center;

}
.inner{
    height: 70px;
    width: 100px;
    background-color: aqua;
}
#one{
    justify-self: end;
}


********************Justify-self:end********************************


*********justify-items:center***********


*************justify-items:end***************



***********justify-items:start***********


Comments

Popular posts from this blog

Assignment

OverFlow

FRONT-END PROJECT SPOTIFY CLONE