Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Web Design & Development
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
using a css file with smarty template

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
sudhakararaog's Avatar
Computer Specs
Member with 75 posts.
 
Join Date: Sep 2007
Experience: Intermediate
20-Oct-2009, 11:38 PM #1
using a css file with smarty template
in the index.tpl file which i access as http://localhost i am able to add the doctype and other tags

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$pagetitle}</title>

</head>
<body>

vale of smarty variable is {$var1}

</body>
</html>

all this works fine however when i add a link tag to call a css file as
<link rel="stylesheet" href="style.css" type="text/css" />
the code for css is
* {
margin: 0;
padding: 0;
}
body {
font: normal 12px Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
}

this css style is not being applied to the index.tpl when i access the page as http://localhost


how can i call the css file from index.tpl

also if i am using a jquery plugin i need to use a script tag to call the javascript files, how do i call these javascript file from index.tpl file


please advice.

thanks
JimmySeal's Avatar
Senior Member with 206 posts.
 
Join Date: Sep 2007
Experience: Getting there
22-Oct-2009, 08:01 AM #2
Where are you adding the <link> tag? If you put it inside the <head> tag, it should work fine, as long as the stylesheet is in the place where it's indicated. Is style.css in the root (top directory) of your site?
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:03 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.