[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

CSS Help

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 8

File: M7Lr6.gif (2MB, 640x480px) Image search: [Google]
M7Lr6.gif
2MB, 640x480px
Hoping to find some coding help here. I'm using @font-face, and it's working on my local device (because the font is installed), but it's not working on the server.

/*THE @FONT-FACE CODE*/

@font-face {
font-family: BigNoodleTitling;
src: url('Files/Fonts/big_noodle_titling.ttf');
src: url('Files/Fonts/big_noodle_titling.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('Files/Fonts/big_noodle_titling.woff2') format('woff2'), /* Super Modern Browsers */
url('Files/Fonts/big_noodle_titling.woff') format('woff'), /* Pretty Modern Browsers */
url('Files/Fonts/big_noodle_titling.ttf') format('truetype'), /* Safari, Android, iOS */

url('Files/Fonts/big_noodle_titling.svg#svgFontName') format('svg'); /* Legacy iOS */
src: local('BigNoodleTitling');

/* BODY CODE */

body {
font-size: 100%;
font-family: BigNoodleTitling, Helvetica, Helvetica Neue, DIN Condensed Bold, Avenir, Times New Roman;
background-color: rgba(255,255,255,1.00);
}

/* CLASS CODE */

.nav {
max-width: 1000px;
min-width: 320px;
margin-left: auto;
margin-right: auto;
padding-bottom: 1px;
text-align: center;
}
.nav h2 {
font-family: 'BigNoodleTitling';
display: inline;
font-size: 32px;
padding: 10px;
color: #FFB8BB;
letter-spacing: 1.2px;
}
.nav h2 a {
color: #FFB8BB;
text-decoration: none;
}
.nav h2 a:hover {
color: #A17477;
text-decoration: none;
}
>>
>>
>>
>>
here's an example that werks

https://paste2.org/4n3XhJ2f

you did file url wrong, add ../
>>
>>312853
This isn't the issue. I've tried fixing it by calling the file via "./" or "../". The "File" folder is on the same level as the css and html files, so that shouldn't be needed. Even when I use it, it doesn't fix the issue.
>>
Go ask >>>/g/wdg
>>
>>312854
oh yea, sorry, im a dumbass, i forgot the fonts in there are in a separate folder

if you make changes in css try force-reloading it with ctrl+f5

try specifying what weight the @font-face file refers to like in the example i posted
>>
>>31285 I'm working on a mac, but shift+command+r does the same thing. I've also tried defining a weight and size. Doesn't work then either.
>>
File: maxresdefault (2).jpg (74KB, 1280x720px) Image search: [Google]
maxresdefault (2).jpg
74KB, 1280x720px
>>312857
well, ok, weird. you may try putting the font file through this thing using the code it generates with appropriate adjustments
https://transfonter.org
>>
>>312858
>https://transfonter.org

...hate to tell you this, but I tried that as well. I actually started making this page with just a ttf. file. I made a kit to get all the other files.

I'm really at a loss here, I've tried almost every suggestion anyone has.
>>
Try linking using the full path. So https://yoururl.com/fonts/etc....
>>
File: 1494301769275.png (1MB, 441x603px) Image search: [Google]
1494301769275.png
1MB, 441x603px
>>312859

MAYBE there's an issue with file permissions on webserver

check browser developer console if font or css urls don't return 403 forbidden or something. i've had that kind of an issue before with files within the web server folder.

https://serverfault.com/questions/124800/how-to-setup-linux-permissions-for-the-www-folder
>>
File: Capture.png (95KB, 1263x677px) Image search: [Google]
Capture.png
95KB, 1263x677px
im pretty noob but consider this:
>>
>>312855

fuck off
>>
try removing 'Files/'

Each "/" represents a folder, so unless you have one folder called "Files" and everything else after that is in that folder, you don't need the Files/.
>>
also, it looks like you have some shit in your code you don't need:

src: url('Files/Fonts/big_noodle_titling.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */

you don't need this. you're already using .woff format, thats all you need to assure it works across web browsers.

try uploading the font to:

https://www.fontsquirrel.com/tools/webfont-generator

itll generate the right CSS for you.
>>
>>312845

try this:

@font-face {
font-family: 'BigNoodleTilting';
src: url("../NameOfFolderYourFilesAreInGoesHere/_noodle_titling.woff2") format('woff2'),
url("../NameOfFolderYourFilesAreInGoesHere/big_noodle_titling.woff") format('woff');
font-weight: normal;
font-style: normal;

}
Thread posts: 18
Thread images: 8


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.