Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Transferring CSS Files
Old 03-02-2006, 01:08 PM Transferring CSS Files
Junior Talker

Posts: 3
Trades: 0
Hi,

I've just started using Dreamweaver 8 and Filezilla for maintaining and updating our websites. I wanted to update some images so I transferred the site onto my hard drive to alter and then back through filezilla to upload. I have done this before with no problem in MX. However, after all the files have loaded onto my hard drive I open up an html page in DW8 and all the CSS do not seem to have loaded. Even though they are there in the folder. All I get is that error/grey box ripped page thing.

Can anyone help? do I have to set them up somehow in DW8 for them to take effect?

Many thanks in anticipation.

Aldy
aldy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-02-2006, 02:50 PM Re: Transferring CSS Files
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Many times the thml pages encode the link to the css pages with absolute urls. In this case, DW isn't going to display the file showing the css. you will have to uploiad the files and view them on the internet server. Or you could change the links to the files using relative links. IF yo do this however you must remember that They will either need to be changed back or make sure the paths are correct.

Do a Find and Replace on the code that references the css . you you can select the dropdown to make the changes site wide. Then when you are finished with everything and ready to upload. Go back in to Find and Replace to change the links back to the original reference.

Just to irriterate - change the code from the absolute reference to a relative, Then change it back to the absolute reference.

(This is all supposing that the absolute url is your problem.)
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 03-03-2006, 07:37 AM Re: Transferring CSS Files
Super Talker

Posts: 102
Trades: 0
To protect yourself from this kinda problems in the future I strongly recommend you using the Site Manager and Files Panel within DW itself.

If you click Site -> New site you can specify where the files of the website you want to work on are located on your HD. Configure remote server access so that you can up and download trough DW. DW8 even let's you synchronize your local site to your remote site and vice versa. When you decide in a later stadium to make some folder changes and drag some files around, DW automatically can fix the paths for you.

Anyway this current problem indeed seems to be a broken link to your stylesheet. If you're in DW press Shift+F11 to get the CSS panel. Click the sheet that's in there and delete it with the trashcan icon on the bottom right. After that click the most left icon which looks like a chain and attach the sheet again. This time it should be fine

I always like to work with relative paths so that even when you move the site to some other location (for instance your webserver) it still works and you don't have to go trough the trouble of fixing everything.

Last edited by ghettobert; 03-03-2006 at 07:39 AM..
ghettobert is offline
Reply With Quote
View Public Profile
 
Old 03-03-2006, 01:50 PM Re: Transferring CSS Files
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Quote:
Originally Posted by ghettobert
DW8 even let's you synchronize your local site to your remote site and vice versa. When you decide in a later stadium to make some folder changes and drag some files around, DW automatically can fix the paths for you.
I've been using DW since 3 and have been able to do these things since then! Unless I am not understanding exactly what you are talking about ghettobert?!! I could sync files so they are automatically uploaded on change. You could always drag files and DW would always update all the pages for you. Same thing with renaming files. It will even change the refence to them in the form action attribute as well.

A little trick I learned: (And this is only worth using if the site has quite a bit of files, so that you don't have to go into every single file and make the changes. )

Let's say yo uare in a folder that has 20 - 30 (or 300! ) files in it for instance.

Go into the first file and highlight the code that you are going to change.

in this case: <link href="http://www.site.comcssfile.css" rel="stylesheet" type="text/css">

Then press [Ctrl] + F
This will open up the search and replace dialogue box.

Then in the replace field put in the code to replace this. In this case the *relative* path: <link href="../css" rel="stylesheet" type="text/css"> For instance

The trick is to use the Find In drop down and choose folder.. Then select the folder that you want to change the files for.

And there you have it. ALL the files are updated.


I Use this technique for redesigns too. When I have to put the redesign for testing on the original domain for testing. I put the entire new site in a folder called newsite.

So all of my absolute paths become http://www.site.com/newsite/

when time comes to move the site over to become the new live site, I just go in and search and replace newsite/ to nothing (just keep the change to field blank) and it changes every single link, path, whatever, site wide. Works like a charm..

(and, many say to just use relative paths. When working on a big site, relative paths become very cumbersome and problematic. Many argue with me, but if you notice almost all the big sites like c|net, etc. They almost always use absolute paths. the reason for this is subdomains. you have to use absolute paths when working on any site that has many subdomains. If you ever get a site that may possibly start using subdomains in the future, the argument for "using relative paths in case you switch domains," changes to "use absolute pathes incase you change to subdomains". Changing a site not using absolute paths when they expand to subdomains is a bear... usually 1,000's pf pages. Aghhhhhhh!!!)


ghettobert is correct, don't get me wrong - this is just a little ...expansion of insight...





--

Last edited by ChipJohns; 03-03-2006 at 01:55 PM..
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 03-06-2006, 06:16 AM Re: Transferring CSS Files
Junior Talker

Posts: 3
Trades: 0
Thank you for your quick and detailed responses, I will try these today and let you know how I get on
aldy is offline
Reply With Quote
View Public Profile
 
Old 03-06-2006, 06:33 AM Re: Transferring CSS Files
Junior Talker

Posts: 3
Trades: 0
Fantastic, everything works okay! Seems that when I loaded up the site there were already default CSS's attached to it. I had to delete these and then replace with the ones I originally created. Thanks for your help guys....
aldy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Transferring CSS Files
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.52152 seconds with 12 queries