Page 1 of 1

ASSIGNING CSS TO A TEMPLATE

Posted: Fri Jun 01, 2007 2:54 pm
by kaysingh
Hi i'm very new to CMSMS and ive got it all installed and running perfectly fine.

HOWEVER,

I've been experimenting with the style sheets and templates, but i cannot get a style sheet to get assigned to a template.

just to make sure i've backed up the existing templates and i've deleted them from the admin, and i've created a basic template and a basic style sheet.

once i've assigned the two and made them active through the admin and i view the page, all i get are the page title, content defaults etc, but no styling, even when {stylesheet} tag's has been included within the template.

any idea's why this is happening??

Re: ASSIGNING CSS TO A TEMPLATE

Posted: Fri Jun 01, 2007 4:44 pm
by RonnyK
Is the stylesheet attached to the template, If you press the "CSS" button on the right of the templatename in "Layout -> Templates".

If you check the source of the page opened, do you see a reference to a stylesheet at the position where you put {stylesheet} and you did out {stylesheet} within the head-section.

Ronny

Re: ASSIGNING CSS TO A TEMPLATE

Posted: Sun Jun 03, 2007 1:06 pm
by kaysingh
hi ronny,

i've checked all of that, and everything is correctly assigned and the css is active for the template.

i only have 1 template and 1 css file. So i cant be making a mistake with assigning the correct css file to the template.

my template code is as follows:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{sitename} - {title}</title>
{metadata}
{stylesheet}
</head>
</__body>

<!-- start header -->
<div id="header">
  <h1>{sitename}</h1>
</div>
<!-- end header -->

<!-- start menu -->
<div id="menu">
  {menu}
</div>
<!-- end menu -->

<!-- start content -->
<div id="content">
  <h1>{title}</h1>
  {content}
</div>
<!-- end content -->

<__body>
</__html>
and my css file is as follows:

Code: Select all

#header {
	width: 750px;
	height: 50px;
	margin: 0 auto;
	top: 400px;
}

ive kept it very basic, as all i want to see is at least one element of my template affected by the css, something i've not been able to do since installing CMSMS

Re: ASSIGNING CSS TO A TEMPLATE

Posted: Sun Jun 03, 2007 1:38 pm
by kaysingh
Ok it seems like that the extrenal css file just doesnt want to work.

therefore i'm using the {literal} tag to include the .css within the tempalte file. and guess what..

it works perfectly.