CalendarTutorials

How to create a calendar widget

how to create a calendar widget

How to create a calendar widget

Before We Start

Every developer needs clean and modern elements to develop their websites, It contains pictures and a user interface element within a website. The most important one and the first section that the user sees when the user enters a website. How to create a calendar widget

So if you are a person who wishes to develop a website, you have to know how to create that properly.

How to create a calendar widget

We are here to solve your problem. In this article we discuss how to create these elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.

Step 1 – Add HTML

It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.

<head>
  <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

</head>
<div class="calendar">
  <hgroup>
    <h1>JANUARY</h1>
  </hgroup>
  <i class="fa fa-bars fa-2x"></i>
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
    <li>10</li>
    <li>11</li>
    <li>12</li>
    <li>13</li>
    <li>14</li>
    <li>15</li>
    <li>16</li>
    <li>17</li>
    <li>18</li>
    <li>19</li>
    <li>20</li>
    <li>21</li>
    <li>22</li>
    <li>23</li>
    <li>24</li>
    <li>25</li>
    <li>26</li>
    <li>27</li>
    <li>28</li>
    <li>29</li>
    <li>30</li>
    <li>31</li>
  </ul>
  <div class="notificacion">
    <span class="fa fa-coffee fa"></span>
    <h3>Today <b> New year</b></h3>
    <a href="#!">AT 8:00</a>
  </div>
</div>

Step 2 – Add CSS

Copy and paste below code in your HTML editor between <style></style> tag.

<style>
@import url(https://fonts.googleapis.com/css?family=Open + Sans:400, 600, 300);

body {
  padding: 0;
  max-width: 800px;
  min-width: 800px;
  margin: 2px auto;
  background-color: #3eecac;
  background-image: linear-gradient(19deg, #3eecac 0%, #ee74e1 100%);
}
.calendar {
  position: relative;
  display: block;
  margin: auto;
  background-color: rgba(44, 44, 44, 0.777);
  width: 380px;
  height: 380px;
  background-image: url("http://images.forwallpaper.com/files/thumbs/preview/31/312489__dark-forest-shadows_p.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 180%;
  -webkit-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75);
  -moz-box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75);
  box-shadow: 0px 0px 5px 0px rgba(50, 50, 50, 0.75);
}
hgroup {
  position: relative;
  display: block;
  margin: auto;
}
h1 {
  text-shadow: 1.2px 1.2px 0.6px #fff;
  text-align: right;
  font-family: "Open Sans", sans-serif;
  right: 20px;
  top: 70px;
  color: white;
  position: relative;
  font-size: 2.4em;
}
.fa-bars {
  position: relative;
  display: block;
  color: white;
  top: -65px;
  left: 10px;
  -webkit-transition: all 0.3s linear;
  -moz-transition: all 0.3s linear;
  transition: all 0.3s linear;
  cursor: pointer;
}
.fa-bars:hover {
  color: rgba(44, 44, 44, 0.777);
}
ul {
  position: relative;
  list-style-type: none;
  top: 15px;
  margin: auto;
}
ul li {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: rgba(44, 44, 44, 0.422);
  margin-right: 2px;
  margin-top: 2px;
  text-align: center;
  color: white;
  font-family: "Open Sans", sans-serif;
  cursor: pointer;
}
ul li:hover {
  color: tomato;
  -webkit-transition: all 0.3s linear;
  -moz-transition: all 0.3s linear;
  transition: all 0.3s linear;
}
.notificacion:not(:hover) {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  font-family: "Open Sans", sans-serif;
  color: white;
  background-color: rgba(44, 44, 44, 0.322);
}
.notificacion {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  font-family: "Open Sans", sans-serif;
  color: white;
  background-color: #000;
  -webkit-transition: all 0.3s linear;
  -moz-transition: all 0.3s linear;
  transition: all 0.3s linear;
}
.notificacion h3 {
  left: 30px;
  position: relative;
  font-weight: 100;
}
.notificacion b {
  color: white;
  position: relative;
  top: 0px;
  left: 60px;
  top: 0px;
  text-align: left;
  font-size: 0.8em;
}
.notificacion a {
  position: relative;
  color: #fff;
  float: right;
  top: -40px;
  right: 7px;
}
.notificacion .fa-coffee {
  position: absolute;
  top: 7px;
  left: 130px;
}

</style>

At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Your Output

how to create a calendar widget

Video Tutorial

Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.


Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button