Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 12-24-2004, 10:54 AM   #1
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
CSS and Template question

Hi all,

I'm re-building a website for a non-profit organization. The original was done without styles or templates. I have it all rebuild with styles and a template. I am using Dreamweaver MX. When I first preview it from Dreamweaver with either IE or Firefox, everything works well, until I try the links to the other pages. The styles don't load, unless I preview them one by one. Now, I have it loaded up in a yahoo account, and I uploaded the files with FTP. After the upload, when I view it, there is no styles or templates. Do the styles and templates have to be in the root directory, cause I have them in a separate directory in the same site. Any help would be appreciated !

Thank you
Daisie
daisiee69 is offline   Reply With Quote
Old 12-24-2004, 12:45 PM   #2
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
You can put the style sheets anywhere you want, as long as you have a valid link inside of your web page document. In the "head" section of your page, insert the text below. Make sure the path leads to the folder and file name of your style sheet and you should be fine.

{llink rel="stylesheet" href="path/path/cssname.css" type="text/css"}
(except replace the {} brackets with the correct brackets to be read in HTML. They won't display here if I type them)

Hope this helps some,
Stryker
__________________
Athlon XP 2800+ • Asus A7N8X (nVidia Nforce2) • Radeon 9600 Pro 256MB • 2x512MB KVR DDR PC3200 Dual Channel • 120GB Seagate 7200RPM 8MB • 160GB WD 7200RPM 8MB • Liteon DVD±RW DL • AOpen DVD±RW DL • Vantec Ion2 350W PSUSend me your picture for the Member Photo Gallery
Stryker is offline   Reply With Quote
Old 12-24-2004, 01:46 PM   #3
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
If you are using external CSS, I believe the root directory is good place to put them. Have the CSS link to the root directory.

kram
__________________
"For today, goodbye. For tomorrow, good luck. And forever, Go Blue!"
University of Michigan President Mary Sue Coleman
kram 2.0 is offline   Reply With Quote
Old 12-24-2004, 04:29 PM   #4
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Quote:
Originally Posted by Stryker
You can put the style sheets anywhere you want, as long as you have a valid link inside of your web page document. In the "head" section of your page, insert the text below. Make sure the path leads to the folder and file name of your style sheet and you should be fine.

{llink rel="stylesheet" href="path/path/cssname.css" type="text/css"}
(except replace the {} brackets with the correct brackets to be read in HTML. They won't display here if I type them)

Hope this helps some,
Stryker
Just to clarify;
Make sure that it the href in this:
<link rel="stylesheet" href="path/path/cssname.css" type="text/css">
is the relative href="/css/cssname.css" or absolute href="http://sitename/css/cssname.css" not the unix /home/directory_name/www/css/cssname.css or windows C:\inetpub\www\css\cssname.css.

I know that it is what stryker meant in his post but using path usually means unix path not the url.
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 12-25-2004, 12:39 PM   #5
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Smile

Thank you all for your responses, but neither of them worked.... LOL. Here is a link to the webpage, I would appreciate if someone can check the codes for me to see which one(s) I got wrong.
http://ca.geocities.com/dianefrisky/index.html

Thanks
Merry Christmas to all
daisiee69 is offline   Reply With Quote
Old 12-25-2004, 12:43 PM   #6
Moderator
Staff
Premium Member
 
Join Date: Aug 2003
Location: Richmond, VA
Posts: 7,835
I'm trying to access the CSS file but the file cannot be found - I keep getting 404s. Is the CSS file physically FTPed to the server and if so, what is the physical location of it?

kram
kram 2.0 is offline   Reply With Quote
Old 12-25-2004, 01:28 PM   #7
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Thanks kram8806 for the quick reply.

All the files are located on my hdd but yes all the files including the CSS file has been physically FTPed to the server. I can see all the files on the server. I have directories for the templates, css, and the graphics and the index.html is at the root.

Thanks
Daisie
daisiee69 is offline   Reply With Quote
Old 12-25-2004, 10:42 PM   #8
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Stryker,
Does llink rel="stylesheet" have to be on every page or can I put it on the template ? Also, when I do that, I don't have access to Apply Styles in Dreamweaver, anymore.
daisiee69 is offline   Reply With Quote
Old 12-28-2004, 05:40 PM   #9
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Anyone else have any ideas ?
I have my styles attached to the template, which is attached to each documents. Should the styles be attached separately from the template ?

Thanks
Daisie

Last edited by daisiee69; 12-28-2004 at 05:56 PM.
daisiee69 is offline   Reply With Quote
Old 12-28-2004, 10:24 PM   #10
Member (8 bit)
 
Cheryl's Avatar
 
Join Date: Aug 2000
Location: Albany, NY
Posts: 252
In your code linking to the stylesheet you have uppercase - /CSS/entrel.css - it is case sensitive, so if you change it to lowercase /css/entrel.css it should work.

For the images, you have the G in /Graphics/ capitalized...change it to lowercase. If it still doesn't work, try removing the .. before the /.

Hope this helps

Cheryl
Cheryl is offline   Reply With Quote
Old 12-29-2004, 05:54 AM   #11
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
My apologies daisiee!
I've been away for the holidays for a bit so I'm sorry for leaving you hanging there.
Cheryl is correct in the "case sensitive" aspect. I have found that when working with files and directories on my HDD that it doesn't seem to care about case. Then, as soon as I move anything to a web server I know very quickly if I have unmatched cases anywhere because it stops working.

I make it a habit to ALWAYS use lower case in pretty much everything I do as far as coding is concerned. File names, folders, etc... as it's just easier to keep track of when there's consistency.

Again, my apologies for disapearing for a while,
Stryker
Stryker is offline   Reply With Quote
Old 12-29-2004, 08:50 AM   #12
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Smile

Thanks Cheryl, but I have change everything to lower case and got rid of the .. before the file names. It's still not working.

Stryker, no need to apoligize.... everyone needs a holiday ))
I have put everything in lowercase, but it still doesn't work. Should the styles be attached to every page or can it be attached only once to the template, then applied to the pages.

Thanks
Daisie
daisiee69 is offline   Reply With Quote
Old 12-29-2004, 09:16 AM   #13
Member (8 bit)
 
Cheryl's Avatar
 
Join Date: Aug 2000
Location: Albany, NY
Posts: 252
[meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"]

I pasted the above from your code....after content'"text/html you have a ; instead of " - believe it or not, stuff like that can mess up what follows.

your graphics links need to be /graphic/imagename.jpg. You're still using a capital G (I pasted a sample of yours below)
[img src="Graphics/colorbar.gif" width="600" height="1]

Try those changes & see if it helps.

Cheryl

oh, and to answer your question...the link for the css only needs to be put in the template - all pages based on that template will have the link
Cheryl is offline   Reply With Quote
Old 12-29-2004, 09:21 AM   #14
PCMech: Saving Lives
 
Join Date: Apr 2004
Location: England, the United Kingdom
Posts: 1,839
Cheryl, that meta tag is meant to have the semicolon and not a quote, the text/html and charset=... is all part of the content attribute and so all goes in quotes and is seperated with a semicolon.
__________________
WhatsThisBoxFor? is offline   Reply With Quote
Old 12-29-2004, 09:28 AM   #15
Member (8 bit)
 
Cheryl's Avatar
 
Join Date: Aug 2000
Location: Albany, NY
Posts: 252
oops, right you are. I've had code messed up because of not using the 2nd ", so I wasn't reading what I should have been

Thanks for pointing that out WhatsThisBoxFor?.

Cheryl

**edit**
did you try removing the first / before "css/entrel.css" so it reads

[link rel="stylesheet" href="css/entrel.css" type="text/css"]. If that works, you'll need to link to the graphics folder the same way.

Last edited by Cheryl; 12-29-2004 at 10:07 AM.
Cheryl is offline   Reply With Quote
Old 12-29-2004, 10:29 AM   #16
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Thanks Cheryl, but when I take the / out, the graphic or style disappears completely. Should also the following coding be in my template ?


Got this in the codes, from a template that I downloaded to use for another website, which works well.

Thanks
daisiee69 is offline   Reply With Quote
Old 12-29-2004, 10:43 AM   #17
Member (8 bit)
 
Cheryl's Avatar
 
Join Date: Aug 2000
Location: Albany, NY
Posts: 252
You shouldn't have to add the other code, but if it works, go for it

Didyou try uploading the new files with the changes? I've noticed the graphics folder still has a capital G. I'll keep looking, but I'm stumped
Cheryl is offline   Reply With Quote
Old 12-29-2004, 11:28 AM   #18
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Thanks Cheryl,
Yes, I have uploaded the new files with the changes. I tried every suggestions, still no go. Adding that coded didn't help either... lol. This is my first time creating a template with CSS in Dreamweaver. Learning a lot though

Something's strange cause when I look at the files in the FTP software, the sizes of the files off my hdd are bit bigger than the ones on the ftp site. Shouldn't they be the same size?

Thanks

Daisie

Last edited by daisiee69; 12-29-2004 at 11:44 AM. Reason: Update
daisiee69 is offline   Reply With Quote
Old 12-29-2004, 07:08 PM   #19
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
Quote:
Originally Posted by daisiee69
Thanks Cheryl, but when I take the / out, the graphic or style disappears completely.
As far as I can tell from accessing the .css file through the web, you should have "css/entrel.css" in your href= quotes. I put the following links side by side to make sure:

http://ca.geocities.com/dianefrisky/index.html
http://ca.geocities.com/dianefrisky/css/entrel.css

The links work, which would indicate to me that your index.html file is in your root directory. There is also a folder in your root directory which contains a folder called css and this folder contains entrel.css.

Just clarifying but could you make sure this is the structure you have?
Thanks,
Stryker
Stryker is offline   Reply With Quote
Old 12-29-2004, 07:15 PM   #20
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Stryker,
Yes, you are right about the structure. I have my index.html at the root, then the css style in its own directory. The template and the graphics are also in its their directory. Should they be at the root ? The only document at the root is the index.html, the rest is in different folders. In Dreamweaver, the preview works fine until I try a link.

Thanks
Daisie
daisiee69 is offline   Reply With Quote
Old 12-30-2004, 05:19 AM   #21
It can never be too quiet
 
Stryker's Avatar
 
Join Date: May 2004
Location: Burlington, Ontario
Posts: 1,090
I would say yes, try moving your pages to the root directory (you may have to change some other links but I would wait to see if everything works with the .css to change other things). The way I see it is, if you have your index.html in the root directory with the appropriate link to your style sheet, the same link is being used for other pages because of the template, but the other pages are in different places (and hence would have different paths). Try dumping everything into your root folder and having links to images, css, etc... from the root into your other folders. If all of your "pages" (i.e. .html files) are in the root, all of the paths can be the same for each page.

By the way, I just wanted to let you know. If there there is something I'm incorrect with in regards to the result of using Dreamweaver or templates, please feel free to let me know. I do all my HTML and Javascript freehand so I find there are a couple of things about the effects of WYSIWYG applications I don't know about. And NO I'm not "showing off", I just thought it might be pertinent in this situation and I don't want to waste your time if I'm incorrect.

Just a theory, but give it a shot.
Hope this helps a bit,
Stryker
Stryker is offline   Reply With Quote
Old 12-30-2004, 12:59 PM   #22
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
splat

Thanks again Sryker, but that doesn't work either. I'm almost ready to give up on it.... lolll

Daisie
daisiee69 is offline   Reply With Quote
Old 12-31-2004, 07:19 PM   #23
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Can someone have more than one template (2) for one website ?
Here is he address again. I have taken the styles out but the graphics still don't show.
http://ca.geocities.com/dianefrisky/index.html

Thanks
Daisie
daisiee69 is offline   Reply With Quote
Old 01-01-2005, 12:02 AM   #24
Member (8 bit)
 
Cheryl's Avatar
 
Join Date: Aug 2000
Location: Albany, NY
Posts: 252
Hi daisiee69

I don't know why your graphics aren't showing - try dumping all the files in the root like Stryker said, then just have all your links use "name.ext" (like the links on your side menu). Don't use a / or ../

As far as templates go, you can use as many different templates as you want for a site. We've got about 10 or 15 different ones where I work - the templates are not uploaded, just the pages based on the template.

Don't give up just yet...

Cheryl
Cheryl is offline   Reply With Quote
Old 01-01-2005, 09:38 AM   #25
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
Thanks Cheryl, but I have tried that, and it doesn't work either... lolll

Happy New Year to all
Daisie
daisiee69 is offline   Reply With Quote
Old 01-01-2005, 01:37 PM   #26
Member (8 bit)
 
Join Date: Oct 2001
Location: ottawa, ontario
Posts: 183
This thread can now be closed as the problem is solved. Thanks to all, and Cheryl was right by taking the "/" out. I don't know why it didn't work before, but I had tried that.

Happy New Year to all !
Daisie
daisiee69 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:14 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2