TechSpot

CSS doesn't display in Firefox

By conwayap
May 15, 2006
Topic Status:
Not open for further replies.
  1. conwayap

    conwayap Newcomer, in training Topic Starter

    I made the page with Dreamweaver - someone on the macromedia forum posted this reply - does it sound legit?

    I think this maybe because your server is not set up correctly for Moz,
    Firefox and Netscape to understand css.

    You might need to contact your host and ask them to set up the server
    correctly.

    I seem to remember other users having similar issues.
  2. Spike

    Spike Newcomer, in training Posts: 2,371

    I don't think so.

    Firstly, you might find the web developer toolbar in Firefox quite handy.

    Secondly, I've just discovered that firefox is displaying the css correctly, but simply can't find that corner image..
    Change the location of that corner image at the beginning of your CSS to...

    /SCHOOLS/RCHS/images/pagebg_right.jpg

    instead of...

    ../images/pagebg_right.jpg

    See if that helps, and let us know if it does :)
  3. conwayap

    conwayap Newcomer, in training Topic Starter

    didn't do anything.

    i have a vast amount of formatting and positioning that doesn't show up as well...since it displays ok in IE but not in Firefox I am tempted to think that it is a standards issue (firefox is strict on standards...right?) but i can't see anything.
  4. Spike

    Spike Newcomer, in training Posts: 2,371

    I'm afraid not. Firefox is correct on standards. MSIE just doesn't comply with them. The more compliant a browser is with the standards, the better.

    Interestingly, now that you've altered that location for the image, while it doesn't show the page in firefoxx normally, as soon as I select the "edit css" function of the toolbar, it does and it all displays wonderfully. This is definitely a very curious issue.

    The formatting isn't showing up simply as a result of the right corner image being missing. When that's added ito the page as it should be, it all displays perfectly.

    One which I'll continue to look at for a little while - that is unless you would like to go to the http://www.CSScreator.com forums and see if they could help. If they do, it would be wonderful if you could tell us what the fix was here at TS, because this one is certainly a bit of a puzzle!
  5. Mictlantecuhtli

    Mictlantecuhtli TechSpot Evangelist Posts: 4,916   +9

    I thought #ids in CSS should be added after element names.

    Run the stylesheet through CSS Validator and check the results.
  6. Spike

    Spike Newcomer, in training Posts: 2,371

  7. conwayap

    conwayap Newcomer, in training Topic Starter

    an interesting response on another thread was that the MIME type was wrong - i think i fixed that, but still no luck.
  8. Spike

    Spike Newcomer, in training Posts: 2,371

    It's definitely not your servers MIME that's wrong here. As I said, You need to correct the syntax on the location of that image, which will bring you at least a step closer. If you leave it like that, it'll never show nomatter what you do.

    Did you install the web developer plugin I linked to in Firefox (lots of useful tools, including the one that will show you what I'm talking about. lol)
  9. conwayap

    conwayap Newcomer, in training Topic Starter

    ok
    so i removed the background image info from the external file and left it in the page source.

    still doesn't work
  10. Spike

    Spike Newcomer, in training Posts: 2,371

    no. I didn't say that.

    You need to put it back into the external file, in the syntax...

    Code:
    body {
    	background-image: url(images/pagebg_right.jpg);
    	background-repeat: no-repeat;
    	margin-top: -1px;
    	margin-left: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    Saying that, it may not the be the syntax mind... Edit that in a local copy, and FTP it to your server in BINARY mode. If it doesn't work then, it may well be MIME related or something, because that does the trick by using a local copy of the css on the page from here.
     
  11. conwayap

    conwayap Newcomer, in training Topic Starter

    didn't work for me either...but i see what you mean when i click on edit css...looks how i want it to...grrrrrrrrrr
  12. Spike

    Spike Newcomer, in training Posts: 2,371

    And worse still, when you add a local copy of the exact same stylesheet to the page using firefox, it works!

    This is even bugging me now! lol
  13. Spike

    Spike Newcomer, in training Posts: 2,371

    OK. I've been looking at this for a little while now, and I've come to the conclusion that this is quite possibly a rendering bug in firefox - every browser has it's bugs, even the good ones. lol

    I would recommend also posting about this here... http://www.csscreator.com/css-forum/, as there are some real CSS guru's over there. If there's a bug in firefox rendering, there's most likely a hack to the code that can fix it, and if it's not a rendering bug, someone over there will probably know what's wrong.

    In the meantime, no doubt some other people will look at this thread, and someone may have an answer here. Personally, I would love to know what the cause of this is and how to solve it.
  14. conwayap

    conwayap Newcomer, in training Topic Starter

    tried binary...no difference.

    i will need a little MIME help - never messed with it before. is it a header in my css file?
  15. Spike

    Spike Newcomer, in training Posts: 2,371

    No. Your server mime types are the identifications for pages that your server sends to the visiting browser to instruct it on how to handle and read the page. If you are using apache these will be in your server config, but I doubt it's those still, even now. I can only recommend the advice I gave in my last post I'm afraid.
  16. Spike

    Spike Newcomer, in training Posts: 2,371

  17. RealBlackStuff

    RealBlackStuff Newcomer, in training Posts: 8,165

    Instead of:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/rchs.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>

    Try:
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <head>
  18. Samstoned

    Samstoned TechSpot Paladin Posts: 2,582

    not that good with css but I do ok
    found this on server issue
    Link Translation
    you must enable link translation for a content type that includes the following:
    • application/x-javascript
    • text/css
    • text/x-component
    • ext/xml
    • .eml
    • .css
    I did not look at your code
    under base href
    I have
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    made with DW8 with php my sql
  19. conwayap

    conwayap Newcomer, in training Topic Starter

    seemed to work, although a user at another forum suggested it may be incomplete - http://www.csscreator.com/css-forum/sutra96188.html#96188
  20. Spike

    Spike Newcomer, in training Posts: 2,371

    If I'm not mistaken, I think RBS may have been trying to say that the doctype section needed to be cleaned up. The Doctype you have now is indeed incomplete, causing you to render in Quirks Mode, which would explain why the problem is "apparently" solved - truth be known, it may not be, and on appearance at the moment, probably isn't.
  21. RealBlackStuff

    RealBlackStuff Newcomer, in training Posts: 8,165

  22. Spike

    Spike Newcomer, in training Posts: 2,371

    Fair comment. :) It does indeed seem to be a mix of xhtml 1.0 transitional and html 4.01 transitional.

    Personally I'd be more inclined to correct the code for xhtml, but that's just me. :)

    However, given that the backround image problem still appears but is corrected when clicking the "edit css" option (and so using a cached local copy of the CSS file I would assume), and given that (as they say on csscreator) firefox opens CSS files as text in the browser, whereas for this page it offers to download the file, there still seems to be a MIME error for the CSS file at my (current, lol) best guess.

    Either that or the css file is being read by the server as a binary file (the file manager on my hosts Cpanel used to do that to configs and php files after editing them on there). The only answer to that would be to create a new copy of the code in a new file, and ftp it in ASCII mode to the server.
  23. RealBlackStuff

    RealBlackStuff Newcomer, in training Posts: 8,165

    When you use <style> in the <head> the text should be entered like javascript:
    <style><!--your css textentries --></style>
    <!-- and --> are missing!
    Also I personally can't do anything with td img... in a CSS/style. Someone explain ?
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.