- This topic is empty.
-
AuthorPosts
-
June 11, 2013 at 11:30 am #45449MasserraParticipant
Hi guys!
Can someone help me figure this out? I have a friend that wants to change his font to fonts from google webfonts, but in a Cargo Collective website that is not upgraded to professional, so he cant change anything in the html.
So I thought of CSS :after content to put the necessary javascript code in the document head, is that possible? Because I remember a post from css-tricks a while ago that did a complete webpage only using CSS and no html except of course the css tag itself. I tried to find the post but I couldn’t. Does someone know how to find it? And has anyone tried this thing I’m trying to do?
Thanks for the help! ;)
June 11, 2013 at 11:48 am #138330Paulie_DMember>I thought of CSS :after content to put the necessary javascript code in the document head, is that possible
No because the :after selector only works on html elements and can’t contain HTML
>Because I remember a post from css-tricks a while ago that did a complete webpage only using CSS and no html except of course the css tag itself.
No such thing. A page is written in HTML and styled with CSS.
Google Fonts are supported in the upgraded version though : http://support.cargocollective.com/customer/portal/articles/670986-webfonts-and-custom-typography
>Google Web Fonts
>Free, hosted service; you can add Google web fonts into your site simply by going to the website, choosing the fonts you’re looking for, and copying the generated stylesheet link into your Custom HTML.
Frankly $66 p.a. seems reasonable for the extra.
June 11, 2013 at 2:04 pm #138359MasserraParticipantHaha! Sorry, I know that css is made for styling, but I thought there could be a way to do that since I remembered someone having published here years ago an article of building a page with css only, no html. By the way, I found it ([https://css-tricks.com/using-css-without-html/](https://css-tricks.com/using-css-without-html/ “CSS without HTML”)) and its no more than a supposition! Hehe! I didn’t remember… :)
But yeah… thats true… even if you could use Hexadecimal entities it would be percepted by the browser as text and not html… and another thing, wasn’t I able to use content with the head tag? Isn’t it a html tag like any other?
Thanks!
June 11, 2013 at 2:16 pm #138361MasserraParticipant*forgot the “why”… “why wasn’t I able to use content with the head tag? Isn’t it a html tag like any other?”
June 11, 2013 at 2:18 pm #138362Paulie_DMember`
` is HTML code but it’s not a element that displays on the page>The head element represents a collection of metadata for the Document.
June 11, 2013 at 2:23 pm #138364MasserraParticipantRight! Css is for styling, so only visible elements can be styled… of course… thanks! ;)
June 11, 2013 at 2:27 pm #138365Paulie_DMember>only visible elements can be styled
Not exactly….elements inside the `
` will be visible unless told not to (the HTML element is a special case) but you are trying to add actual **HTML code** with a pseudo element and that’s not possible. -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.