tags:

views:

301

answers:

2

Quick question, is it possible to have an input field in a form use a non-system font in html5 and css3? So if someone types in the form field the text could be something like gotham?

+3  A: 

Yes, it is possible. I just had to remove the @font-face font from a site that I applied it on or else I'd link to a working example for you.

Here's what I had for the CSS though:

@font-face {
    font-family: 'QuicksandBook';
    src: url('/media/fonts/Quicksand_Book.eot');
    src: local('Quicksand Book'), local('QuicksandBook-Regular'), url('/media/fonts/Quicksand_Book.ttf') format('truetype');
}

html, body,
input, textarea {
    font-family: QuicksandBook, Arial, sans-serif;
}
digitaldreamer
+1  A: 

Nothing special to do here, just setup a @font-face as normal:

@font-face {
   font-family: "Delicious";
   src: url("Delicious-Bold.otf"); 
}

.myinput {
   font-family: "Delicious";
}  

This works for me on Chrome for OSX

Bartek
cool, very simple. thanks.
pfunc