html - Why is my website not using the fonts I specified? No access to the font? -


i using rails , have specified fonts follows:

#application.html.erb includes in head: <link href='http://fonts.googleapis.com/css?family=indie+flower' rel='stylesheet' type='text/css'>  #one of stylesheets includes: body{ font-family: 'indie flower', sans-serif; } 

i'm using bootstrap gem (which perhaps overriding above?).

on development server, however, site not use fonts specified. think it's helvetica instead. doing wrong?

i checked inspector, gives following information:

  • for body says font-family: "indie flower",sans-serif;.
  • for example, next div says same.
  • the h3 within div says font-family: inherit;.
  • same h5 within div.
  • for p within div says font-family: "indie flower",sans-serif;

so expect font indeed indie flower isn't. checked using font, , again text shows belief helvetica instead of font specified.

what doing wrong?


update: application.html.erb:

<!doctype html> <html> <head>   <meta name="viewport" content="width=device-width, initial-scale=1">   <meta http-equiv="content-type" content="text/html; charset=utf-8" />   <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>   <link href='http://fonts.googleapis.com/css?family=indie+flower' rel='stylesheet' type='text/css'>   <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>   <%= csrf_meta_tags %>   <%= render 'shared/shim' %> </head> <body>   <%= yield %> </body> </html> 

i tried moving font above stylesheet, made no difference.

and application.css:

/*  * manifest file that'll compiled application.css, include files  * listed below.  *  * css , scss file within directory, lib/assets/stylesheets, vendor/assets/stylesheets,  * or plugin's vendor/assets/stylesheets directory can referenced here using relative path.  *  * you're free add application-wide styles file , they'll appear @ bottom of  * compiled file styles add here take precedence on styles defined in styles  * defined in other css/scss files in directory. better create new  * file per style scope.  *  *= require bootstrap-datepicker3  *= require_tree .  *= require_self  */ 

update 2: removing fonts application.html.erb confirms not show right font. in inspector has right font specified. however, it's not using font it. similarly, specify in css font-family random name , shows same font now.

i have impression therefore it's correctly specified in css app not have access font , therefore falls on verdana. perhaps app unable load font? why or why not have access font? tried different google fonts , belief source each time correctly specified in application.html.erb. do?

try this:

body{     font-family: 'indie flower', cursive; } 

Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -