top of page
Writer's pictureWeb Coding

Clean Modern button to add to your website

Today I will be teaching you how to create a clean modern button for your website using only HTML and CSS


HTML

<!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>
 <button>Click Me</button>
</body>
</html>

CSS

*{
 padding0;
 margin0;
}

body{
 min-height100vh;
 displayflex;
 align-itemscenter;
 justify-contentcenter;
 background-color#141824;
}

button{
 height20vh;
 width50vw;
 font-size8vh;
 background-colorrgba(0000);
 bordernone;
 color#D1E8E2;
 border-radius5px;
 outlinenone;
 cursorpointer;
 border-radius10vh;
}

button:hover{
 filterbrightness(85%);
 color#FFB600;
 background-colorrgba(202436);
}

If you found this blog post helpful don’t forget to check out my other projects and if you want more content follow me on

YouTube: https://www.youtube.com/channel/UC2nxqB2usQIS2c8zwVZKWEQ

Instagram: https://www.instagram.com/coding_for_the_web/

Twitter: https://twitter.com/LearnWebCoding

9 views

Comentarios


bottom of page