Amit Kumar Gupta
Amit Kumar Gupta

Reputation: 7413

Rupee symbol without using image, javascript, or font

I tried following code to print rupee symbol;

Firefox : <rs><span style="position:absolute;margin-top:-5px">_</span>&#2352;</rs>
<br />
IE7 : <rs><span style="position:absolute;margin-top:-4px">_</span>&#2352;</rs>
<br />
Chrome : <rs><span style="position:absolute;margin-top:-10px">_</span>&#2352;</rs>

But due to brwser incopatability of margin-top, I can not accept it as final solution. I also had tried border-bottom with 25% width for <span>. But it dint work since needs to be absolute. And in this condition it takes 25% page height.

<rs><span style="position:absolute;border-bottom:1px solid;height:25%;">&nbsp;&nbsp;</span>&#2352;</rs>

Please suggest a solution as css properties which are multi browser compatible and dont require js,image or font.

*I dont want anything in pixels since it'll require changes every time when i need to resize rupee symbol.

Upvotes: 1

Views: 646

Answers (1)

Rory McCrossan
Rory McCrossan

Reputation: 337656

Why not use the Rupee character code itself: &#8377;?

Upvotes: 1

Related Questions