[RESOLVED] change asp:textbox font name
hi, can we apply custom font to asp:textbox object using custom font? i dont find it working with my sample
CSS
Code:
.font_malyalam1
{
font-family: Jwala;
font-size:12px;
}
HTML
Code:
<asp:TextBox ID="TextBox2" runat="server" Height="185px" Width="375px" TextMode="MultiLine" CssClass="font_malyalam1" ></asp:TextBox>
unless i do these
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
TextBox2.Font.Name = "Jwala"
End Sub
Re: change asp:textbox font name
Using font-family in CSS should work properly as long as the font is installed on the viewer's computer. I'm assuming you have the font installed, so I'm wondering if some other CSS is causing a conflict for you. Is there a font-family style being applied on the ID attribute of the textbox?
As said, be aware that the user must have the font installed to see it. CSS3 has a "new" @font-face declaration which allows you to display a font that the user need not have installed. It's not consistently implemented across browsers yet, though.
Re: change asp:textbox font name
hey, OMG i forgot to include stylesheet file. the code does works except that it on IE and FF but not in Opera, did not test in Chrome though.
I'll check the @font-face as well.
thanks.