I have used the style like this in my .css file but it is not working. What can I do to make my code work?
font-family: Lato, Helvetica, sans-serif;
I have used the style like this in my .css file but it is not working. What can I do to make my code work?
font-family: Lato, Helvetica, sans-serif;
Please put this code in head section
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
and use font-family: 'Lato', sans-serif;
in your css. For example:
h1 {
font-family: 'Lato', sans-serif;
font-weight: 400;
}
Or you can use manually also
Generate .ttf
font from fontSquiral
and can try this option
@font-face {
font-family: "Lato";
src: url('698242188-Lato-Bla.eot');
src: url('698242188-Lato-Bla.eot?#iefix') format('embedded-opentype'),
url('698242188-Lato-Bla.svg#Lato Black') format('svg'),
url('698242188-Lato-Bla.woff') format('woff'),
url('698242188-Lato-Bla.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Called like this
body {
font-family: 'Lato', sans-serif;
}
http
to https
. –
Tonettetoney http://
to https://
, because secure pages won't load fonts from an insecure html. –
Cohberg Download it from here and extract LatoOFL.rar
then go to TTF and open this font-face-generator click at Choose File
choose font which you want to use and click at generate then download it and then go html
file open it and you see the code like this
@font-face {
font-family: "Lato Black";
src: url('698242188-Lato-Bla.eot');
src: url('698242188-Lato-Bla.eot?#iefix') format('embedded-opentype'),
url('698242188-Lato-Bla.svg#Lato Black') format('svg'),
url('698242188-Lato-Bla.woff') format('woff'),
url('698242188-Lato-Bla.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body{
font-family: "Lato Black";
direction: ltr;
}
change the src code and give the url where your this font directory placed, now you can use it at your website...
If you don't want to download it use this
<link type='text/css' href='http://fonts.googleapis.com/css?family=Lato:400,700' />
© 2022 - 2024 — McMap. All rights reserved.