External font not loading correctly CSS -


my css custom font doesn't load onto page when load website. @ least, not until click "home" or 1 of other tabs. have idea why , how fix it? used

@font-face { font-family: opensanslight; src: url(opensans-condlight.ttf); }  @font-face {     font-family: openbold;     src: url(opensans-condbold.ttf);     }  @font-face {     font-family: openregular;     src: url(opensans-regular.ttf);  } 

and

body, html{     background-color: #fff;     margin:0;     padding:0;     height: 100%;     width:100%;      font-family:"opensanslight"; } 

the font doesn't load until click link within website. have idea why?

edit: still trying resolve this... no dice far.

second edit: people keep telling me check if font in right place. is. , works. not upon loading page, unknown reason. hence question. please don't answer if don't read question.

third edit: few hours of fiddling have not resolved issue. tried expanding support of fonts using

@font-face {     font-family: 'openregular';     src: url('opensans-regular-webfont.eot');     src: url('opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),          url('opensans-regular-webfont.woff2') format('woff2'),          url('opensans-regular-webfont.woff') format('woff'),          url('opensans-regular-webfont.ttf') format('truetype'),          url('opensans-regular-webfont.svg#open_sansregular') format('svg');     font-weight: normal;     font-style: normal;  } 

but still, same thing happens. noteworthy: firebug greys out font when inspecting when it's not showing, turns blue , kicks in when click home or 1 of other tabs , font works.

fourth edit: few more days have passed , i'm still struggling problem. it's driving me insane. please me. i've tried every single possibility on w3c, google results, stack overflow , every suggestion, yet nothing works me. i'm sure code correct won't load on first try no matter try.

make sure css file , font files in same directory, if not either put them in same directory or amend css have correct path files

@font-face {     font-family: opensanslight;     src: url(path/to/opensans-condlight.ttf); }  @font-face {     font-family: openbold;     src: url(path/to/opensans-condbold.ttf);     }  @font-face {     font-family: openregular;     src: url(path/to/opensans-regular.ttf);  } 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -