Hello,
Please could someone check the following code and give me some feedback on it. I'm very rusty on my CSS and I just about managed to put something together that worked. Please can you explain any feedback to me in a straight forward way as a newbie :-)
I've included the rest of the code so you can see where I have called the dividers. I suspect I have deployed the box model properly missing out "border".
Thanks and Kind Regards,
BG.
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Great Britain Holiday Checker Tool</title>
<!-- Inline CSS -->
<style>
/* Left Blue Border */
#borderleft {
margin-top:1px;
margin-left:2px;
height:95%;
width:8%;
background-color:blue;
position:absolute;
}
/* Top Blue Border */
#bordertop {
margin-top:1px;
margin-left:2px;
height:10%;
width:95%;
background-color:blue;
position:absolute;
}
#head {
padding-top:5%;
padding-left:27%;
position:absolute;
}
#body {
padding-top:10%;
padding-left:20%;
position:absolute;
}
/* Collaborative Header CSS */
h1 {text-align:center; color:black; font-family:"Arial", Calibri, "sans-serif";}
/* Collaborative Paragraph CSS */
p {margin-left: 20px; font-family:"Arial", "Calibri", "sans-serif"; color:blue;}
</style>
</head>
<body>
<!-- Top Border Call -->
<div id="bordertop">
<p><a>
</div>
<!-- Left Border Call -->
<div id="borderleft">
<p>a</p>
</div>
<!-- Head Divider Call -->
<div id="head">
<h1>Great Britain Holiday Checker Tool</h1>
</div>
<!-- Body Divider Call -->
<div id="body">
<?php
/* Variable declarations */
$weekday = date("D");
$od = date("S");
$day = date("d");
$month = date("M");
$year = date("Y");
$hour = date("H");
$minute = date("i");
$seconds = date("s");
/* Multidimensional array for holidays - Christmas will be added later. */
$holidays = array( array("Boxing_Day", 2612),
array("Easter_Monday", 0104),
array("Good_Friday", 2903),
array("January_2nd", 0201),
array("May_Day_Holiday", 0605),
array("New_Year's_Day", 0101),
array("New_Year's_Eve", 3112),
array("Orangeman's_Day", 1207),
array("Saint_Patrick's_Day", 1703),
array("Spring_Bank_Holiday", 2705),
array("St_Andrew's_Day", 3011),
array("Summer_Bank_Holiday_Scotland", 0508),
array("Summer_Bank_Holiday_ENIW", 2608),
);
/* Display current time and date */
echo "<p>The time when you loaded this page was: {$hour}:{$minute}:{$seconds} GMT and the date was {$weekday}, {$day}{$od} {$month} {$year}.</p>
<p>I haven't learnt Javascript yet so I can't set it to auto-update without using meta-refresh.</p>";
/* To determine whether it is Christmas Eve the following day and if so to display a message after 7pm on 23 December. */
if ($day == 23 and $month == 12 and $hour > 19)
{
echo "<p>Christmas Eve is tomorrow.</p>";
}
/* To determine whether it is Christmas Day the following day and if so to display a message after 7pm on 24 December. */
elseif ($day == 24 and $month == 12 and $hour > 19)
{
echo "<p>Christmas Day is tomorrow.</p>";
}
/* Message to display if it is neither Christmas Eve or Christmas Day the following day. */
else
{
echo "<h1>Today is not a holiday. Tomorrow isn't either.</h1>";
}
?>
</div>
</body>
</html>