Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple font-face in external css
    primarykey
    data
    text
    <p>I know that it's possible to have <a href="https://stackoverflow.com/questions/4872592/multiple-font-face-in-css">multiple font-faces</a> on css. Now I have two html pages that use these fonts but in the future there'll be more; now those font-faces are declared via inline css and used via classes. What I really wanted was to wrap up all my font-faces into a single fonts.css and then on each individual html pages reference that css and use <code>&lt;p class="...-font"&gt;&lt;p&gt;</code></p> <p>So my fonts' css is like this:</p> <pre><code>@font-face { font-family: 'Komika'; src: url('/bin/res/font/KOMIKAX_-webfont.eot'); src: url('/bin/res/font/KOMIKAX_-webfont.eot?#iefix') format('embedded-opentype'), url('/bin/res/font/KOMIKAX_-webfont.woff') format('woff'), url('/bin/res/font/KOMIKAX_-webfont.ttf') format('truetype'), url('/bin/res/font/KOMIKAX_-webfont.svg#KomikaAxisRegular') format('svg'); font-weight: normal; font-style: normal; } .komika-font {font: 30px 'Komika', Tahoma, sans-serif;} @font-face { font-family: 'Nevis'; src: url('/bin/res/font/nevis-webfont.eot'); src: url('/bin/res/font/nevis-webfont.eot?#iefix') format('embedded-opentype'), url('/bin/res/font/nevis-webfont.woff') format('woff'), url('/bin/res/font/nevis-webfont.ttf') format('truetype'); font-weight: normal; font-style: normal; } .nevis-font {font: 500% 'Nevis', Tahoma, sans-serif;} </code></pre> <p>And the html is like this:</p> <pre><code>&lt;head&gt; &lt;link rel="stylesheet" href="/bin/res/style-fonts.css.php" type="text/css" /&gt; &lt;link rel="stylesheet" href="/bin/res/style.css.php" type="text/css" /&gt; &lt;title&gt;&lt;?php echo $photo_title ?&gt;&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1 class="____"&gt;Some text here&lt;/h1&gt; &lt;body&gt; </code></pre> <p>And at the ____ should be "nevis-font" but the IDE (Dreamweaver) doesn't even autocomplete.</p> <p><em>Is it possible? Because I tried it and it didn't work (the chosen font wasn't displayed).</em></p> <hr> <p><strong>I think I got it, the problem was that the css containing the font-faces can't end with .php like I had. I just use *.css.php because the .php forces the server to compress the css files.</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload