DEV Community

Cover image for Daily Code 58 | Styling Buttons (πŸŸ₯ HTML & 🟦 CSS Course 1)
Gregor Schafroth
Gregor Schafroth

Posted on

Daily Code 58 | Styling Buttons (πŸŸ₯ HTML & 🟦 CSS Course 1)

Alright, since in my last few JavaScript exercises I found out that HTML and especially CSS are kind of limiting what I can actually do on my websites, I decided to start a course to solve this! I picked this free one here https://www.youtube.com/watch?v=G3e-cpL7ofc

And so the next few days my daily code posts will just be about code and exercises from this course πŸ™‚Let’s go!

My Code

Today was just an intro. HTML I skipped because that I know, but CSS I had so style 3 buttons. So that’s what I did today and here is that code :)

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Subscribe Button</title>
  <style>
    .subscribe-button {
      background-color: rgb(200, 0, 0);
      color: white;
      border: none;
      height: 36px;
      width: 105px;
      border-radius: 2px;
      cursor: pointer;
      margin-right: 8px;
    }

    .join-button {
      background-color: white;
      border: rgb(41, 118, 211);
      border-style: solid;
      border-width: 1px;
      color: rgb(41, 118, 211);
      height: 36px;
      width: 62px;
      border-radius: 2px;
      cursor: pointer;
      margin-right: 8px;
    }

    .tweet-button {
      background-color: rgb(2, 137, 255);
      color: white;
      border: none;
      height: 36px;
      width: 74px;
      border-radius: 18px;
      font-weight: bold;
      font-size: 15px;
      cursor: pointer;
    }
  </style>
</head>

<body>
  <button class="subscribe-button">SUBSCRIBE</button>
  <button class="join-button">JOIN</button>
  <button class="tweet-button">Tweet</button>
</body>

</html>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)