Changing my Font?

I don’t know much about coding CSS but i do know that you can change your font using it. I found the w3schools tutorials, which gave me the code that i have to use, but i can’t seem to get it to work. How would this work? and would you maybe provide me with the code?

Try adding the following:

.text {
  font: "the-font-you-choose";
}

It’s

{
font-family: garamond; (for example) 
}

You can also do

{
font-size: #px; (# = pixels, 50px for example)
font-weight: bold; (example)
}

Then you can also do text-shadow for a glow effect if you want

{
text-shadow: 0px 3px 10px rgba(138, 150, 0, 1), 0px -3px 10px rgba(138, 150, 0, 1);
}

That would make a green glow like so:

http://jsfiddle.net/GLgTx/

Thank you guys so much, one last thing. Am i able to add a font i downloaded? example: i have a font on my computer called AleviRou.ttf would i be able to use that? And why i ask is because i did try this one
{
font-family: AleviRou; (for example)
}
Without any luck.

You should be able to if it’s installed on your PC, make sure you use quotation marks though to call it up exactly.

{
font-family: "AleviRou";
}

That should work, I use an installed custom font on mine and it works fine :smile:

Thanks alot. i can get it to work, with the standard fonts installed but not custom ones. But i do thank you for all your help, i think i have what i need. I’ll play around with it from here :smile:

FYI using font is shorthand for setting all CSS font attributes at once, which would technically work (even if not as clear) :wink:

Oh yeah I understand that completely :smiley:

I just think it’s better to teach people new to CSS to do them seperately so when they go back over it to change it in future, it’s so much easier!

Almost like putting /* Comments */ to help

I didn’t mean to offend, sorry!

Oh you didn’t offend at all. your help did it’s purpose and i learned alot, but can only get it to work with standard fonts though. and found one that i was happy with. But just to clarify, it is the filename,extension or the name it has in the program? (example the AleviRou.ttf is the file name, but called H2D2 alevita in photoshop for example)

That is a very good point! I’ve never had fonts be differently named… Hmm…

I think you will have to trial and error to find out, but I would say it would be the file name you call up

This topic was automatically closed after 62 minutes. New replies are no longer allowed.