KuljeetSingh.com

Oct 10, 2013

Display India Rupee Symbol (Rs.) in HTML pages

There are multiple ways to display the Indian Rupees Symbol in HTML Pages.
First method is a Web API http://cdn.webrupee.com/font
Using this in link tag you can display Rs. in HTML <link rel="stylesheet" type="text/css" href="http://cdn.webrupee.com/font">

<span class="WebRupee">Rs.</span> 200

Earlier I was also using this API / Stylesheet in my HTML Pages. But suddenly the API broke and design of my HTML page got disturbed. Then after googling a bit I found another solution for this. I found the Font files of web rupee and method to use the font files with in the web page. The method is useful and normally used to display the other fonts that are not available on client sides. for e.g. Hindi Fonts. For this method :
1. You need to copy the webrupee ttf, eot and other font files and font.css in the root of website folder.
2. Give the reference to font.css
<link rel="stylesheet" type="text/css" href="/font.css">
3. Use the WebRupee class as described above.
<span class="WebRupee">Rs.</span> 200 /-

Output
Rs. 200 /-


Using this method, you don't need to worry for any API break and your design won't disturb.

Attachment to this article contains all the supporting Font files, font.css and sample page using the font.css

Download Sample Code Here

 
?

Blogs | About Me | My Projects | Contact Me
【丰胸】虽然,这些药物对于乳房而言粉嫩公主,能够起到一定的丰胸效果,可朋友们这些药物的后遗症,也会在我们服完后慢慢显现出来丰胸产品,譬如:机体中的雌激素水平被打破了,就容易导致我们的月经变得不正常丰胸食物,从而使得我们的腰跟着变得圆嘟嘟,而严重的话还可能会导致我们的子宫出血,肝脏受损丰胸效果,所以说若是采用药物来进行丰胸,大家还是小心谨慎些为好。