Is MobileMe messing up my CSS

Discussion in 'Web Design and Development' started by jarira, Jun 3, 2010.

  1. jarira macrumors newbie

    Joined:
    Jun 3, 2010
    #1
    I'm developing a few websites right now and they work great on my local but once I put them on mobileme, the CSS files do not link properly. The sites render fine in IE but not Firefox. I've used a debugger and it says that the linked CSS is not text.

    I feel like it's a simple problem but have no idea what to do. I have tried relative and absolute file paths already. Here is one of the sites, please check the source if you have a minute, thank you!

    http://web.me.com/jaritalee/RBH/
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    What are you using to make your CSS / HTML files? My first guess is that you're saving things as Rich Text when you want to be saving them as Plain Text.
     
  3. jarira thread starter macrumors newbie

    Joined:
    Jun 3, 2010
    #3
    I'm using visual studio since I'm using a work computer

    the html is being saved as an HTML file, and the CSS is saved as CSS (according to Studio)
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    I get this error for the page,
    Code:
    Error: The stylesheet http://web.me.com/jaritalee/RBH/gallery.css was not loaded because its MIME type, "application/octet-stream", is not "text/css".
    Source file: http://web.me.com/jaritalee/RBH/
    
    Error: The stylesheet http://web.me.com/jaritalee/RBH/default.css was not loaded because its MIME type, "application/octet-stream", is not "text/css".
    Source file: http://web.me.com/jaritalee/RBH/
    showing that's it's a mime type issue. The HTML validator also shows an issue with a BOM, which could be partly caused by Visual Studio.

    Switch
    Code:
    <style type="text/css">
    @import "gallery.css";
    </style>
    to
    Code:
    <link href="gallery.css" rel="stylesheet" type="text/css" />
    I also recommend getting a better text editor like Notepad++ or Sublime for Windows and open and re-save the file from there to see if it helps if the above suggestion doesn't. Visual Studio is a poor choice for web files like this.
     
  5. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #5
    Firebug is reporting the errors:
    Code:
    The stylesheet http://web.me.com/jaritalee/RBH/default.css was not loaded because its MIME type, "application/octet-stream", is not "text/css".
    [Break on this error]
    The stylesheet http://web.me.com/jaritalee/RBH/gallery.css was not loaded because its MIME type, "application/octet-stream", is not "text/css".
    I agree with angelwatt, try a different text editor.
     
  6. jrlcopy macrumors 6502

    jrlcopy

    Joined:
    Jun 20, 2007
    #6
    Or for the time being try direct linking to it.

    Code:
    <link href="http://web.me.com/jaritalee/RBH/default.css" rel="stylesheet" type="text/css" />
    or

    Code:
    <link href="./default.css" rel="stylesheet" type="text/css" />
     
  7. jarira thread starter macrumors newbie

    Joined:
    Jun 3, 2010
    #7
    I've tried your recommendations with a test page made in notepad

    http://web.me.com/jaritalee/vertabrate/index2.html

    going to this page prompts firefox to download the html file. I have a feeling that this might be a MobileMe problem since I have moved my original files to a different testing space and everything is loading fine.

    Seems to be an interesting MobileMe bug, or I am just a giant n00b

    either way, thank you very much for your suggestions, and I am no longer developing in Visual Studio when misusing work time :) Thanks!
     
  8. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
  9. jarira thread starter macrumors newbie

    Joined:
    Jun 3, 2010
    #9
    it is loading for me as well now but the CSS is still not working. Font should be calibri/sans-serif.
     
  10. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #10
    You've got bad syntax in the CSS.

    Code:
    */
    
    * {
    	margin: 0;
    	padding: 0;
    }
    
    body {
    	background: #FFFFFF url(images/img01.jpg) repeat-x left top;
    	text-align: justify;
    	font-family: calibri, Geneva, sans-serif;
    	font-size: 11px;
    	color: #ffffff;
    }
    Get rid of the */
     

Share This Page