PDA

View Full Version : External css files in Dreamweaver


fs_tigre
10-09-2009, 02:28 PM
Hi,

I have been using Dreamweaver for while now and last night I was looking at the link for the external .css file and it actually add an absolute link (<link href="username/drive/CSS/styles.css" rel="stylesheet" type="text/css" />) Instead of a relative link (<link href="CSS/styles.css" rel="stylesheet" type="text/css" /> )

So I was wondering how Dreamweaver handles this when you upload the files to your server.

Will Dreamweaver change the link to a relative link or will this update the absolute link to reflect the new location?

Thanks

Corrosive
10-09-2009, 02:31 PM
Will Dreamweaver change the link to a relative link or will this update the absolute link to reflect the new location?

Not unless you define your site correctly.

fs_tigre
10-09-2009, 02:58 PM
So, as a good practice should we be changing/checking the links created by Dreamweaver if you are going to use a different FTP client like Filezilla to upload your files?

Thanks a lot!

DWcourse
10-09-2009, 04:29 PM
So, as a good practice should we be changing/checking the links created by Dreamweaver if you are going to use a different FTP client like Filezilla to upload your files?

NO! There are a couple possible issues here. If you defined your site incorrectly, you could get links to files on your computer. That's a problem no matter how you upload the site.

Another possibility is that you haven't saved your html file yet. Until you save it, DW doesn't know how to make the link, so it creates a temporary link pointing to the linked file on your computer. Once you save the html file, the link should be fixed.

And one more possibility. When you preview in a browser from Dreamweaver, in the browser status bar (but not in the actual file), all the links will appear be to files on your computer. Since the links are actually relative that won't be a problem as they will still work when the complete site is uploaded.

Bottom line. Save your HTML file and then look at the code. If any links begin with file:/// you've got a problem.

fs_tigre
10-09-2009, 05:18 PM
You are awesome thanks a lot!