Friday, March 7, 2014

Tute 29 : Show Date and Time in Home Page : Part Two

Now we set the time in our website. So open the index.php file in notepad++. We write some code after site name. We create a div and include the datetime.inc.php file.
So write this code after " <h1>Tute School</h1> " line:


-----------------------------------------------------
<div class="date-time">
    <?php include ('require/datetime.inc.php'); ?>
</div>
----------------------------------------------------



Then go to google chrome and refresh the home page.  We see a date and time show after the website name.
Now will some decorate the date and time. So open the "stylesheet.css" file in notepad++. At the end of page we write this code :

------------------------------
.date-time{
padding:0px;
margin:0px 30px;
font-size:16px;
text-decoration:none;
}
------------------------------
Save the file and go to google chrome and refresh the page. We see some decorated the date and time.

No comments :

Post a Comment