xtiansimon — 2010-06-21T17:05:36-04:00 — #1
This is really strange. The site I'm working on is hosted on my localhost testing server and looks the same on Mac/Safari and F11/Firefox 3.5. This is Apache/PHP/MySQL. And Mac/Safari and XP/IE6 look good with MAMP Server.
Then, mI uploaded the site to a godaddy host account and the CSS is all broken in F11/Firefox 3.5 but reasonably in tact with XP/IE6. I use two include files, one each for the URL/server path variables and MySQL database connections. I've rechecked these files and they're ok. (besides IE wouldn't work if they were not correct).
What could be going on here? I'm not even sure what to search for since this is very odd to me-- a (mostly) valid HTML, and 100 percent valid CSS site isn't displayed the same on localhost and remote servers.
xtiansimon — 2010-06-22T09:41:16-04:00 — #2
SXTX, There are two include files containing site variables and the connection to the database. These are the only changes necessary to move the site from one server to another. There is no reason for the site to be broken unless there is something different about my AMP server then the godaddy server.
And the CSS is linked using,
<link href="../_css/default_site.css" type="text/css" rel="stylesheet" media="screen" />
scallioxtx — 2010-06-21T17:09:18-04:00 — #3
Are you saying you're using PHP to serve CSS files?
If you are, you should add
to the top of the PHP file
xtiansimon — 2010-06-30T09:57:57-04:00 — #4
Thank you for the reply. I figured out the trouble. I was testing the advise of another forum and altered the dothtaccess file with this line:
addtype application/x-httpd-php .css
It was supposed to modify the httpd.conf to facilitate the execution of php in css files. Once this line was removed, linked css started working again.
sonjay — 2010-06-29T19:43:42-04:00 — #5
Could be GoDaddy doesn't like the underscore in _css.
Or, if the link is from the root of the site, that suggests the css file is found a level above the site root, and that could definitely be problematic. From your main index page, the link should look something like
<link href="css/defaultsite.css" type="text/css" rel="stylesheet" media="screen" />
<link href="/_css/default_site.css" type="text/css" rel="stylesheet" media="screen" />
Notice there's no leading ".." in those links.