|
-
Nov 9th, 2010, 04:26 PM
#1
Thread Starter
Fanatic Member
[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
Learn something new every .001 second. 
-
Nov 9th, 2010, 05:45 PM
#2
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.
Last edited by SambaNeko; Nov 9th, 2010 at 05:51 PM.
Reason: Typo.
-
Nov 10th, 2010, 02:18 AM
#3
Thread Starter
Fanatic Member
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.
Learn something new every .001 second. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|