« Web, HTML, Tech Forum

how to get a particular section of text to have a font??

CAN SOMEONE CODE THIS FOR ME IM BEGGING??? ahhghghg. not the headers either its more like the body text i think


Report Topic

2 Replies

Sort Replies:

Reply by Seb

posted
updated

here's the best way ive been able to do it (with the cool fonts):

for the cool fonts, put the following at the beginning of your code (above <style>)


@font-face { font-family: 'Font name'; 

src: url(font link); 

} span{ font-family: 'Font name'; text-align: center; }


and then in the section of code relating to where you want the font (aka everything under the <style>, you could put (blurbs section for example)

  .profile .blurbs .section h4 {

        font-family: 'Font name';

}

and change sections to whichever section you want the font in. (like .profile .friends .person, etc)

which would make the blurbs section look something like this (header is winkle, body is kilo)


you could use multiple fonts too, just put multiple of the @font-face like this:

@font-face { font-family: 'winkle'; 

src: url(font link); 

} span{ font-family: 'winkle'; text-align: center; }

@font-face { font-family: 'kilo'; 

src: url(font link); 

} span{ font-family: 'kilo'; text-align: center; }

and then in the appropriate section you would do font-family: 'Font name'; with the name of the font you want in that section, which Is what I did for the photo above.

an example in a normal block of code:


and as for font links, the way I do it is uploading the .ttf or .otf to filegarden, and then pasting the link it gives me into "font link" section, but i'm sure you could do it with another file hosting service as well. just make sure the link ends in .ttf or .otf 


Permalink Report Reply

Reply by Vash ︵ ♪

posted

YOU A GOAT FOR THIS THANK YOU SO MUCh!


Permalink Report Reply