typography.css, but nothing

Permalink 1 user found helpful
Hey forum,

i've added some classes in the typography.css file, but when i add the class to some text in the content, nothing happens in the front end. But i can see the changes happen in the text editor in the backend. You can see my site here:http://www.nokakur.lund-co.dk

Don't know if i've explained it well enough :P

//Anders J.

 
FernandoCordeiro replied on at Permalink Best Answer Reply
FernandoCordeiro
==================EDIT========================

Just took a better look at your style.css

You set a relative path for the URL. Try setting a absolute one.

Example:

@font-face {
  font-family: "HelveLol";
  src: url("http://nokakur.lund-co.dk/themes/Nokakur/HelveNeuThiCon.eot");
  src: local("HelveNeuThiCon"),
    url("http://nokakur.lund-co.dk/themes/Nokakur/HelveNeuThiCon.woff") format("woff"),
    url("http://nokakur.lund-co.dk/themes/Nokakur/HelveNeuThiCon.ttf") format("truetype");
}


================End of edit==============
I'm keeping the rest of the post, just for the record.
=========================================

I found a few stylesheets on your website, but something I noticed:

You're applying style.css, and its rules are "ruling" on your website. I can find no overlapping styles or anything.

Actually, I've never seen a website with this little conflicts, it's quite amazing.


That put aside:
1 - You have 2 <title> tags. Get rid of one of them, preferrably the one fixed in your template, the C5 title tag is overruling the original one anyways.

2 - I can't fing no typography.css, but I suppose it'd work if you just put it in your header, just below the other ones.


Which is when we need to remember some little thinggies, just in case...

1 - If you have a PHP include for elements/header.php, remember the stylesheet link goes in the header.php file.

2 - Remember to use the proper PHP to include the stylesheet.
Something like:
<link href="<?=$this->getThemePath()?>/Typography.css" rel="stylesheet" type="text/css" />


Try linking the Typogtaphy stylesheet back online and I'll take a better look.

Best of luck to you.
mkly replied on at Permalink Reply
mkly
Ok lets back up a second on this.

Typically you will have the style.css file and the typography.css file added in the element/header.php like this
<link rel="stylesheet" charset="utf-8" media="screen" href="<?php echo $this->getStyleSheet('style.css') ?>" />
<link rel="stylesheet" charset="utf-8" media="screen" href="<?php echo $this->getStyleSheet('typography.css') ?>" />

Note that typography.css will come after style.css

Best Regards,
Mike
Ihateit replied on at Permalink Reply
Embarrasing i simply forgot to add the link to the typography file. I stole the template from one of my old sites. I must just have assumed that it had all the right relations. Thanks for the help guys, you are awesome.

//Anders J
sully210 replied on at Permalink Reply
sully210
I am having the same problem with a caveat. I have my styles in my typography.css file, they appear in the tineMCE editor and I can apply them. It ads a span tag and appears correctly in the editor, but does not appear correctly in any browser even though all tools indicate that the styles are indeed being used. Here is the css I am using:
.openBold {
   font-weight:bold;
   font-size: 14px;
   color: #006;
   margin-bottom: 6px;
}
.openAnnounceBold {
   font-weight:bold;
   font-size: 13px;
   color: #666;
   margin-bottom: 6px;
}

This is what the tinyMCE editor generates when I apply the styles:
<h2>Welcome to Cove Ledge Inn & Marina!</h2>
<p><img class="img_left" style="float: left;" title="Sign" src="/index.php/download_file/view_inline/13/" alt="Sign" width="138" height="222" /><span class="openBold">Located in the heart of all you want to do without the crowds and high prices!<br /></span><span class="openAnnounceBold">Mystic - Connecticut Beaches - Foxwoods Casino - Mohegan Sun Casino - Rhode Island Beaches - World Class Shopping & Dining - Watch Hill - Antiques - Wineries - Boat Charters<br /></span>You can spend your vacation relaxing by the pool, kayaking, boating, barbecuing and enjoying the peace and quiet here at the resort, or you can go all day with the endless activities right here in the middle of everything that the beautiful coasts of Connecticut and Rhode Island have to offer.<span class="openAnnounceBold"><br /></span></p>

Here is a link to the site:http://coveledgeinn.com
I have tried before to use styles and have had to simply write the html in my editor and then add it to an html block to get them working, however, that defeats the purpose of letting my clients edit their sites with the ease that c5 is supposed to provide. You can see an example of it here:http://elmwoodpizza.com
Please note that the styles do indeed appear in the menu but I had to write the html and then add an html block because styles from the editor simply would not work. Any help is greatly appreciated as I need to get this site live today:-)
Thanks
Ihateit replied on at Permalink Reply
Are you sure you have a link to the .css file in your template?
sully210 replied on at Permalink Reply
sully210
Sorry, I am getting better at this but still trying. Doesn't it automatically link to the typography.css file for the theme I am using? The styles appear and the source code says they are being used? Where do I put the link to the typography.css for the rigid light theme I am using? Thank you for the spedy reply:-)
Ihateit replied on at Permalink Reply
I can't really answer that. It's been a year since i build a template in Concrete5, so i can't remember. I can just see that the reason my typography.css wasn't used on the site, was because i forgot to link to the file from my template :-) Hope you figure it out.
sully210 replied on at Permalink Reply
sully210
I did indeed figure it out. It was in a file called top.php in this particular theme. I really would have thought that when you apply a theme it would automatically add that link in the header. Anyway, thanks a lot for your help and have a great day.