Accessibility

CSS Advisor

How do I declare my css file in Dreamweaver?

by Miryha1986 on September 23, 2010 Avg Rating 3.0 (1)   |   Log in to rate post.

Tagged with Explorer 8.0 , Font , Opera 9.0 , Text , Firefox 3.5 , Float , Margin , Safari 4 , Border , Position , Padding , Width/Height , Color , Background

Problem

I need to know how to re-direct Dreamweaver to use a css file?

Solution

Directions please

Detailed description

I originally bought a temple. I copied all the files and then creating my website from the copy (in case I messed up I would have the original).  I now see this was a mistake.  Dreamweaver was still using the original pictures and css files, and not the copied ones.  I only discovered this when I uploaded it toa web server to test it out, and it said it wasn't finding my css files even though I had uploaded them.  This was because it was searching for the original files on my server.  I moved the default image folder around and that works okay now.  I changed the code so that it directs to /default.css on the server rather than my hard drive.

 

But the /default.css on the web server wasn't the one that I had been working with.  The one that Dreamweaver had been saving changes to was the ORIGINAL css file.  So I moved the CORRECT css file into my files, moved the other one out, and made it all correct on the server.  Now my website looks great on the web, but Dreamweaver can't locate the css file! It thinks it should still be in the same place.  There must be a way to tell Dreamweaver which css file to use?

 

I hope this all makes sense. Basically it works on the web server, but no longer works in Dreamweaver so I cannot edit the site.

 

The site is saskrheumatology.ca if that helps.




Text ID: CSSHELP198678



Comments (5)

To add a comment, please Log in.




Similar Problems

I have had similar problems. I am very new to web design and unix lol. So needless to say I have had a TON of File management issues. I now know the difference between absolute and relative paths.

My css problem is strange. I can always get the css onto my website, but it is nice to be able to see "live mode" in all the different formats; mobile, tablet, and laptop/desktop. My issue is that sometimes "/css/style.css" works which it should always work that way, and it does... for my website, not for DW. Sometimes "../css/style.css" works sometimes i need "../.../css/style.css"

I understand that ../ means up one folder, but I am still confused. Right now the only css i cannot get to view in DW are my html's in the root folder just /whatever.html, everything in the subfolders is good.

I AM ALSO HAVING A SH*TLOAD OF PHP/MYSQL DATABASE INTEGRATION PROBLEMS. I even set up a test .html and did all the steps and it worked fine... but when i try to use the exact same correct info (modified only where it is different b/c it is a different database with like 20 more "columns") it doesnt work always something wrong with my php... o well I think I got it I will just have to redo the form with the awesome form builder i found... takes all the html/php hand coding out of it.

Is there anyone who could maybe take a look at my site and see whats wrong with my
http://pips-llc.com/Cooperation/BIP.html
the php just doesn't even act like it works, and I believe it is also just a reference issue.
Thank You

Linked

Just GET your css file that's working off the remote server into your local hd. Then your link should be ok. You must have had some file management issues.

..

Okay thanks so much. I realize they should be in the identical location to the remote server, but my trouble is it wasn't in the correct place on my server for uploading in the first place.  Now I've moved it to the correct place so the remote server is okay, but I need Dreamweaver to find it on my server as well.  I will try the tips you have mentioned about attaching a style sheet.  Thanks again.

I need to know how to re-direct Dreamweaver to use a css file?

Just seen your URL

The problem is the / in front of "/default.css"
in
<link href="/default.css" rel="stylesheet" type="text/css">
Remove the /
and move or upload a new default.css to the same folder as your home page

I need to know how to re-direct Dreamweaver to use a css file?

Normally the CSS file(s) are located in the sites root folder, i.e. the folder where your home page is located.
Assume this file is named style.css
You would have this line in the head section of your home page, probably called index.html
<link href="style.css" rel="stylesheet" type="text/css" />

For a page 1 folder deeper you add ../ to the code
<link href="../style.css" rel="stylesheet" type="text/css" />

Dreamweaver will add this code for you to your HTML file
Make sure CSS is ticked under the top Window menu
Click CSS Styles
Hover over the link icon (looks like a number 8 on it's side) at the bottom of the window - it says 'Attatch Style sheet' Click on the icon, then Browse to your CSS file

IT sounds like the files are in different relative locations on your computer and your hosts server.

The layout of files and folders and file spelling must be identical on both these computers







CSS Advisor home
Submit a post

rss

CSS ADVISOR RSS FEEDS
Recent: POSTS | COMMENTS | EDITS


Browsers
Internet Explorer (103)
Mozilla/Firefox (52)
Opera (18)
Safari (38)
CSS Properties
Background (25)
Border (10)
Color (10)
Float (23)
Font (6)
Margin (11)
Padding (9)
Position (40)
Text (30)
Width/Height (27)