bluehost

Tuesday, 24 May 2022

How To Make a Smooth Grid Layout Using CSS.

CSS can be used together with HTML to give a good HTML Website and other features. 

CSS is used to style HTML codes and make them attractive.

Without CSS, HTML website together with other programs like apps would be o no attraction at all.
CSS and HTML go hand in hand, and without one , the other would be of no much use.

In this article, I'm going to show you how to create attractive, and smooth user grid using both CSS and HTML.
Below are the codes of HTML register;
<body id="body">
<div id="container" class="container">
<h2>Register here</h2>
<div class="logo" ></div><br><br>

<div class="fields">
<input class="email" type="email" class="email-input" placeholder="Enter Email" ><br>
<input class="username" type="text" class="user-input" placeholder="Enter Username"><br>
<input class="password" type="password" class="pass-input" placeholder="Enter Password"><br>

<input class="password" type="password" class=" pass-input" placeholder="Confirm Password"><br>

<button type="button">Register</button>
</div>

<p>Already have an Account? <span id="login"><a href="index.html" style="color:#fb2525;">Login Here</a></span></p>

</div>


<script>

</script>
</body>
 

  sign in codes;
<body id="body">
<div class="container">
<h2>Login here</h2>
<div class="logo" ></div><br>
<div class="fields">
<input class="username" type="text" class="user-input" placeholder="Enter username"><br>
<input class="password" type="password" class="pass-input" placeholder="Enter password"><br><br>
<button type="button">Login</button>
</div>
<p id="forgot" onclick="Forgot()" >Fogort Password?</p>
<p>Create New Account <span id="register" > <a href="register.html" style="color:#fb2525;"> Here</a></span></p>

</div>


<script>
function Forgot() {
console.log('clicked');
}
</script>
</body>


Below are the codes of CSS;
#body{
margin:0;
padding:0;
background:#cbced1;
background-size: cover;
background-position:center;
font-family: sans-serif;
}
.container{
width: 350px;
height: 450px;
position: absolute;
left: 40%;
top: 2%;
color: #24cea9;
text-align: center;
padding: 60px 35px 35px 35px;
border-radius: 40px;
background: #ecf0f3;
box-shadow: 13px 13px 20px #7e878f,
-13px -13px 20px #e6dede;

}

#container{
width: 350px;
height: 550px;
position: absolute;
left: 40%;
top: 2%;
color: #24cea9;
text-align: center;
padding: 60px 35px 35px 35px;
border-radius: 40px;
background: #ecf0f3;
box-shadow: 13px 13px 20px #7e878f,
-13px -13px 20px #e6dede;
}

.logo{
background: url("bloh.jpg") no-repeat;
width: 70px;
height: 70px;
background-size: 100% 100%;
/* background-color: #fd7213; */
border-radius: 50%;
top: 30%;

margin: auto;
box-shadow: 0px 0px 2px #5f5f5f,
0px 0px 0px 5px #517691,
8px 8px 15px #5f5f5f,
-8px -8px 15px #ffff;
}

.fields{
width: 100%;
padding: 5px 5px 5px 5px;
}
.fields input{
border:none;
outline: none;
background: none;
font-size: 18px;
color: #555;
padding: 20px 40px 20px 35px;
}

.username, .password, .email{
margin-bottom: 10px;
border-radius: 25px;
box-shadow: inset 8px 8px 6px #cbced1,
inset -8px -8px 6px #ffffff;

}


button{
background: #24cea9;
border-radius: 30px;
outline: none;
cursor: pointer;
border: none;
width: 250px;
height: 60px;
font-size:14px;
font-style:normal;
font-weight: bold;
text-align: center;
font-family: 'lato', sans-serif;
color: #fff;
border: none;
box-shadow: inset 3px 3px 4px #49caf6,
inset -3px -3px 3px #ffffff;
/* transition: 0.5s; */
}

button:hover{
background-color: #49caf6;
}
p{
font-size: 14px;

}


You can add more features and make your grind look more attractive.

No comments:

Post a Comment

React vs Angular; Front-End Web Development

Angular and React  are two of the most popular Javascript tools for front-end development. React is a Javascript created by Meta...