Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

editing "basic.css" vs. template

How come when I add CSS to "basic.css" it does not take effect?  I have to add my CSS to my main template instead.  I know I'm missing something simple, so go easy on me.

Matthew Doucette
___________________________
www.sawtoothdistortion.com (tech articles)
www.matthewdoucette.com
www.jasondoucette.com

Matthew Doucette
Friday, July 30, 2004

Oops... sig didn't work.  And it looked kinda big.  This is better:

Matthew Doucette
___________________________
http://www.sawtoothdistortion.com/

Matthew Doucette
Friday, July 30, 2004

Did you add a link to you stylesheet in the head area of your template code? The format would look like this:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Site Name</title>
    <link rel="stylesheet" type="text/css" href="basic.css" media="all">
</head>
    

Carmen Carter
Friday, July 30, 2004

Okay, obviously I misunderstood the "Do not use HTML tags" directive for posting. That was *supposed* to be a code block. Hope you can still make sense of it.

Carmen Carter
Friday, July 30, 2004

Are you sure it's being linked and that the path in the link is correct?  I don't mean to be insulting but that's the most common cause of "css doesn't work".  If you've added styles directly to your template make sure they don't take precedence over the new declarations you're adding to the css file.

Ken McKinney
Friday, July 30, 2004

Matthew,

I viewed the source of your home page and did not see a link that includes the basic.css CSS stylesheet into your page.  I think you need to include a link to basic.css in the head portion of your template.

Like this:
1) Right-click on basic.css in CityDesk and select Copy Magicname.
2) Open the template, switch to HTML mode, and type in the <link ...> stuff.
3) Highlight the href attribute value and paste in the magic name of your basic.css file (Use the magic name so that the template will reflect the location of basic.css even if you move it around).

You should have something similar to this.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$.SiteName$} | {$.headline$}</title>
<!-- Include CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="PTMFOG0000000151.css" title="Basic Stylesheet" />
</head>

David Burch
Friday, July 30, 2004

That's odd Carmen, I typed in HTML tags using the Firefox browser and mine went through.

David Burch
Friday, July 30, 2004

Better close the meta tag or the CityDesk XHTML parser might throw it all away.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{$.SiteName$} | {$.headline$}</title>
<!-- Include CSS Stylesheet -->
<link rel="stylesheet" type="text/css" href="PTMFOG0000000151.css" title="Basic Stylesheet" />
</head>

David Burch
Friday, July 30, 2004

Actually David's got correctly turned into entities so the tags would display as text Carmen's didn't, hidden characters in the pasted text maybe.

btw The CityDesk article editor will do a nice job of this if you need to include example html in an article.  Cut your sample html from a text editor and past it into normal mode in a CityDesk article.

A real pain if you do it accidentally but it can be useful :-). 

Ken McKinney
Friday, July 30, 2004

Ah,  I think I passed mine through notepad.

David Burch
Friday, July 30, 2004

Carmen, Ken, David... you were all correct.  I just didn't link it, as I wasn't sure how to and I wasn't sure if CityDesk was suppose to be linking it by default.

Anyway, I followed David's advice step by step and it worked!  Thanks for the help and thanks for going easy on me!!! :)

Matthew Doucette
___________________________
http://www.sawtoothdistortion.com/

Matthew Doucette
Monday, August 02, 2004

*  Recent Topics

*  Fog Creek Home