The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

@import not working

View previous topic View next topic Go down

Solved @import not working

Post by Valoish on July 3rd 2017, 9:29 pm

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari
Who the problem concerns : All members
Forum link : http://www.canvasforums.com

Description of problem

I have the following import rule pasted at the top of my CSS Stylesheet but for some reason it isn't working..
Code:
@import url('https://fonts.googleapis.com/css?family=Hind|Noto+Sans|PT+Sans|Raleway|Quicksand');
Whenever I try to use one of those font families in my CSS it doesn't show on the forum


Last edited by Valoish on July 5th 2017, 5:14 pm; edited 1 time in total
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: @import not working

Post by Ange Tuteur on July 3rd 2017, 11:09 pm

Hi @Valoish,

If memory serves right, @import rules don't work in the stylesheet unless you deactive the basic CSS. (Display > CSS > Deactivate the Basic CSS) The reason they don't work is because Forumotion merges the forum's basic CSS and your custom CSS, with the basic CSS coming BEFORE your custom CSS, so it renders the @import rules useless, because @import rules have to be at the very beginning of the stylesheet. (see "@import" for extra info)

It should work if you disable the basic CSS, but that can pose a problem if you're using basic styles.. I think the best alternative would be to edit the overall_header template and include the following tag in the <head> section.
Code:
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Hind|Noto+Sans|PT+Sans|Raleway|Quicksand"/>
Basically you place the import URL as the href value.
avatar
Ange Tuteur
Forumaster

Male Posts : 13175
Reputation : 2876
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: @import not working

Post by Valoish on July 5th 2017, 4:35 pm

Ooh boo ; A; Okay I guess I'll have to use the HTML tag instead XD
Thankies~
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: @import not working

Post by Draxion on July 5th 2017, 5:06 pm

May I mark this solved, @Valoish?


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1696
Reputation : 223
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: @import not working

Post by Valoish on July 5th 2017, 5:14 pm

I did before whattheheck
Marked it again LOL
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: @import not working

Post by Draxion on July 5th 2017, 5:18 pm

Thank you. Smile
Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1696
Reputation : 223
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum