Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: open

Message Too Old, No Replies

Creating CSS Templates in DW4

     
8:17 pm on Dec 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2002
posts:179
votes: 0


I've decided to build a website using CSS only no tables. I already know how the pages will look like etc. However, I wanna use a template to save time. I already made one, defined the editable regions (I'm using MD4), but when I try to create a "new from template" page it doesn't work. Namely, the new page doesn't retrieve the styles from the .css external file. The link to the .css file is correct. I don't know what else to do. Anyone?

Thanks,
Dan

8:23 pm on Dec 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 0


I guess you need to ask that in the WYSIWYG and Text Code Editors [webmasterworld.com] forum since this is not really about CSS but rather about Dreamweaver.

Andreas

8:29 pm on Dec 14, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2002
posts:179
votes: 0


Thanks for the reply. I'm not sure what the problem is - that's why I asked. I mentioned Dreamweaver because I thought it might help.
12:33 pm on Dec 15, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2001
posts:2488
votes: 0


Can't say i have ever had the problem before

So the code for the external .css file is in place in the template, and of course saved.

Questions,

Have you built a page from the template, and saved it before previewing?
Have you checked that the .css link (and correct) is in the new page?

It sounds like a buggy problem with DM, as far as i am aware their are no restraints on including external files for style control on template files.

2:26 pm on Dec 15, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 21, 1999
posts:2141
votes: 0


If you're expecting your styles to appear in DW's DesignView window when using an external sheet, my experience is that they will not. But if your links are correct, they do appear when using Preview A Browser. Internal styles, those imbedded in the HTML on your page, DO appear in the DesignView.
9:20 pm on Dec 15, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2002
posts:179
votes: 0


Thanks guys.

Caine
Yes I did what you said. The link to the external css file is not correct when I save the new template based page - instead of css/file.css it shows templates/css/file.css. I don't know why it does that. However, when I correct the mistake it still don't work. And after I save and close the file and then open it back up - the mistake is still there!

Dan

11:57 am on Dec 16, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 17, 2002
posts:155
votes: 0


If you're saving your new file in the main root of your site and the external css file is in a templates sub-folder, then templates/css/file.css would be the correct path. As soon as you save a file in a different location from the original, Dreamweaver corrects any changes in file paths automatically.

You didn't say if the styles were showing up in design mode. If they are then apply the template, save the new file first and then try previewing it - as mentioned, the external style sheet won't show up in preview until you save your file.

11:10 pm on Dec 16, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2002
posts:179
votes: 0


Thanks man. Somehow it's fixed.

Dan