Logo Luan Morina
Display the Current Date Demo

Thursday

21

November 2024

HTML & PHP

<div class="calendar-container"> 
<div class="calendar-header">
 <span></span> 
 <span></span> 
 </div>
  <div class="calendar-body">
   <h1><?php echo date("l"); ?></h1>
   <h2><?php echo date("d"); ?></h2> 
   <h3><?php echo date("F") . " " . date("Y"); ?></h3> 
  </div> 
</div>

CSS

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500&display=swap');

.calendar-container {
margin: 0 auto;
max-width: 260px;
font-family: "Oswald", sans-serif;
} 

.calendar-header {
display: flex;
flex-direction: row;
justify-content: space-around;
background-color: rgba(204, 84, 70, 0.44); 
border-top-right-radius: 10px;
border-top-left-radius: 10px;
border-bottom: 4px solid #ffffff;
}
	
.calendar-header span {
background-color: rgba(237, 240, 241, 0.44);
border: 4px solid rgba(255, 255, 255, 0.44);  
width: 20px;
height: 40px;
border-radius: 6px;
position: relative;
top: -20px;
}
	
.calendar-body {
background-color: rgba(255, 255, 255, 0.44);
min-height: 100px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
padding: 20px;
text-align: center;
text-transform: uppercase;
}

.calendar-body h1 {
font-size: .80em;
margin: 0;
text-transform: uppercase;
}

.calendar-body h2 {
font-size: 4em;
margin: 0;
text-transform: uppercase;
}

.calendar-body h3 {
font-size: 1.2em;
font-weight: normal;
}
   Display the current date with PHP