Create a textbox watermark using CSS and jQuery

Step 1: –

First of all, we need to reference the latest jquery plugin (at the time being  version 1.9.1):

<script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js“></script>

Step 2:-

Add some styling to the textbox watermark, which is usually a light grey text font

<style>

.watermark
{

font-family: Calibri, Arial;

font-size: 14px;

color:gray;

}

</style>

Continue reading

Add new fonts to website using CSS

Create a folder named fonts and add your ttf (font) files there. In your html page add a style  tag or create a new style sheet and do as follows:

<style>

@font-face {font-family: “sample”; src: url(fonts/sample.ttf);}

body { font-family: sample; }

</style>

 

Simple, right? 😉