Hi, I'm trying to use CSS files to mimick the iGEM2007 front page for the IC project page. But I am making some changes to the CSS file, and because it would be good to have everything on the iGEM wiki for the Jamboree, I have been trying to host the CSS file on the wiki...
So far, it works fine with IE7, but Firefox doesn't pick up the style sheet at all. Have a look at the page, on my sandbox: http://parts.mit.edu/igem07/index.php/User:Dirkvs/Sandbox
Here are the two stylesheets: http://parts.mit.edu/igem07/index.php/User:Dirkvs/Stylesheets/mainpage.css http://parts.mit.edu/igem07/index.php/User:Dirkvs/Stylesheets/navmenu.css
As you probably know, the front page (externally hosted) stylesheets work well for both IE7 and Firefox. So it looks like the problem comes when trying to host it on the wiki itself.
So, can anyone help? Is there any markup that I need to add to the file so that Firefox sees it properly?
Having your CSS file on a wiki page means that the page you are trying to pull will be corrupted with all the wiki stuff. I would recommend you to upload directly your CSS file onto the wiki, and use the full http path of the uploaded file in your HTML code.
btw, your sandbox example seems to work fine with FireFox, OS X.
In some situations, hosting the CSS file on the wiki seems to work... see this presentation: http://openwetware.org/wiki/IGEM:IMPERIAL/2007/Projects/In-Veso/Presentations/13-09-07
It is not possible to upload CSS files to the wiki using the file upload facility - the system complains that the file format is not valid. Having said that, I can upload it as a .txt instead, but that only works with IE7, and not Firefox.
The page I linked to above is currently working fine because I moved the CSS files to my own servers, so they are hosted externally. I stopped trying to host the stylesheet files on the wiki because that was holding me back from finishing the page.
Eventually, we will either want to host the CSS files on the iGEM servers, or include the stylesheets in wiki templates (a less clean, but more flexible alternative).
This is an interesting issue. In my experience it is simplest to host the css file on the wiki. Mediawiki would normally mark the content up with all of its html and style tags, but you can actually request that it not do this by appending ' ' to the url of the page. This is how the style sheets for the igem07 front page work. It's a nice solution because maintaining the file is pretty straightforward (just update the wiki page) and it takes full advantage mediawiki's revisioning system.