Created
April 19, 2021 12:07
-
-
Save pnmensah/5c6233e2bbfb6e8144583221b2a71e5b to your computer and use it in GitHub Desktop.
CSS Calender
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="calendar-wrapper"> | |
<h1>Decemeber</h1> | |
<ul class="calendar"> | |
<li class="weekday">Sun</li> | |
<li class="weekday">Mon</li> | |
<li class="weekday">Tue</li> | |
<li class="weekday">Wed</li> | |
<li class="weekday">Thu</li> | |
<li class="weekday">Fri</li> | |
<li class="weekday">Sat</li> | |
<li class="first-day">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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.calendar { | |
display: grid; | |
grid-template-columns: repeat(7, 1fr); | |
} | |
.first-day { | |
grid-column-start: 3; | |
} | |
.calendar-wrapper { | |
width: 280px; | |
} | |
.weekday { | |
background: #eee; | |
} | |
h1 { | |
text-align: center; | |
} | |
ul { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
text-align: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment