• 0

CSS Not Applying in Firefox


Question

For my companies website (Secure-Res) the same style sheet is used throughout the site. When you go to "Our Company", then click on "In The News" then click one of the news articles - the news pages don't have their styles applied to them. Why would these particular pages not work? It's only in Firefox, IE shows the styles on these pages.

I know the site doesn't validate and that the underbelly of the site might not look too pretty, but I've been trying to figure out what's going on and I just can't seem to find it. Complete CSS/XHTML validation is not an option right now because we've got too much other stuff to do but this should at least work and display correctly. I've tried making things validate on my computer but nothing seems to fix it, any ideas?

One of the offending pages is HERE.

Link to comment
https://www.neowin.net/forum/topic/319289-css-not-applying-in-firefox/
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Another point I forgot to mention was that the CSS validates but the statement "To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML." is given by the validator. However much that tells of the situation I thought it might be helpful to others though it hasn't to me.

  • 0

The site looks pretty much the same to me in both browsers.

  Little Moe said:
"To work as intended, your CSS style sheet needs a correct document parse tree. This means you should use valid HTML." is given by the validator.

585906180[/snapback]

Tells you nothing really. It is included on all css validation results. It is saying that in order for the browser to interpret and display the css properly, the html should be valid. This can be checked using the html validator found at the w3c. For best compatability you should aim for xhtml 1.0 compliance with your site, athough html 4.0 is still acceptable.

  • 0
  Little Moe said:
So on the Offending Page the styles are applied for you in firefox?

585906240[/snapback]

They don't appear right away in firefox.. however, for some odd reason, when I go to "edit CSS" (using the web developer extension), it suddenly shows up and works. Maybe an odd bug in something in the code that firefox doesn't like.

  • 0

There is nothing wrong with using:

<link href="secure.css" rel="stylesheet" type="text/css">

Except that it's missing a "media" attribute. From my site:

<link rel="stylesheet" href="style.css" type="text/css" media="screen" />

Also, there are a number of errors... as in the page is not validated. Check out the W3C XHTML validator to help out. Somtimes it is necesary to display a "DOCTYPE" for things (like CSS) to work properly -- even in IE!

The W3C Markup Validation Service

  • 0
  Quote
Complete CSS/XHTML validation is not an option right now because we've got too much other stuff to do

Not really an excuse. It should be coded as valid as possible during development. Developing an entire site and then deciding to validate it causes a lot more work.

Apart from a few proprietary attributes and the mixing of XHTML style empty tags in what is mostly a HTML4.01 document, there isn't much wrong. One thing that was flagged up was the multiple use of an id (nav), which is bound to cause problems as they are supposed to be unique. Bunging an alt attribute (even if empty) in all images will drop the "error" count down significantly.

One thing: why is it sent as UTF-16? Your meta tag states ISO 8859-1, and that's good enough.

I did wonder why such a simple looking page clocked in at 34K until I saw the <option> values. You don't need the entire URL, just the path from the root will do. Oh, and you'll need a submit button. Not everybody uses JavaScript you know. This means you'll need a redirect page to bounce to the select[select.selectedIndex].value.

  • 0
  B4L1STA said:
They don't appear right away in firefox.. however, for some odd reason, when I go to "edit CSS" (using the web developer extension), it suddenly shows up and works.  Maybe an odd bug in something in the code that firefox doesn't like.

585906445[/snapback]

Same thing happens here. :blink:

Edit: and if you close the sidebar, it goes away again.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Windows 11 is getting a useful new audio feature by Taras Buria Photo: phamtu1509 Windows 11, in its current form, does not offer a quick and easy way to play audio over more than one device. If you have a bunch of audio devices connected and you want to play music on all of them, you have to tinker with third-party software to make it work. Apparently, Microsoft wants to change that with a new feature coming soon to Windows 11. @phantomofearth, the ever-giving source of Windows insights, discovered that the latest Windows 11 preview builds have a hidden toggle in quick settings that lets you share audio to multiple devices with just a few clicks. All it takes is clicking "Shared Audio" in the control center, selecting two or more available devices, and pressing "Share." As usual, there are no official announcements yet, so details about this feature remain unknown. Still, you can probably expect the new shared audio feature to make it to a Windows 11 preview build in the near future. In other Windows Insider news, Microsoft recently revealed that one of the recent taskbar changes was pulled from the operating system due to negative feedback. The company experimented with a simplified taskbar tray area, but later decided to nuke it because people did not like it. Still, there are plenty of other features coming soon to Windows 11. Check out our recent top 10 list here. Hopefully, all of them will make it to the Stable channel soon.
    • Chinese? It sounds extremely dangerous. I’ll reconsider buying a Meta Quest 3.
    • - What's your salary? Is it more than $100k a year? - Nah, it's $100 mil a year.
    • Compared to my ear buds which are the size of a matchbox, cover a much broader frequency range, and work everywhere without setup? Yeah, still not buying this as a replacement.
    • Meta's Superintelligence team staffed by 50% Chinese talent, 40% ex-OpenAI by Hamid Ganji Mark Zuckerberg's latest big bet at Meta involves building a team of the best AI superstars in the market to lead the so-called Superintelligence Labs. The goal of this team is to develop AI models that will ultimately lead to Artificial General Intelligence (AGI). AGI refers to an AI model with capabilities comparable to, or even beyond, those of the human brain. Achieving human-level cognitive abilities with an AI model requires substantial investments, as well as hiring the best talent to build such a system. That's why Meta is throwing hundreds of millions of dollars at AI researchers from OpenAI, Apple, and other companies to recruit them for its Superintelligence team. A user on X has now shared a spreadsheet that provides us with some unique insights into Meta's Superintelligence team and the origins of its 44 employees. The leaker claims this information comes from an anonymous Meta employee. The listing claims that 50 percent of the staff at the Superintelligence team are from China, which demonstrates the significant role of Chinese or Chinese-origin researchers in Met's AI efforts. Additionally, 75 percent of these staff hold PhDs, and 70 percent of them work as researchers. Interestingly, 40 percent of the staff are ex-OpenAI employees whom Mark Zuckerberg poached from the maker of ChatGPT. Additionally, 20 percent of Meta's Superintelligence team members come from Google DeepMind, and another 15 percent come from Scale AI, a startup that Meta recently acquired in a $15 billion deal. Another interesting point is that 75 percent of the Superintelligence team are first-generation immigrants. The leaker claims that each of these employees is now earning between $10 million and $100 million per year, although Meta still needs to confirm these substantial figures. However, it has already been reported that Meta is offering up to $100 million in signup bonuses to poach the best AI talent from OpenAI and other rivals. The revelation that half of Meta's Superintelligence team consists of Chinese nationals could trigger concerns within the Trump administration and Congress.
  • Recent Achievements

    • First Post
      nobody9 earned a badge
      First Post
    • One Month Later
      Ricky Chan earned a badge
      One Month Later
    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      ATLien_0
      207
    3. 3
      Michael Scrip
      206
    4. 4
      Xenon
      138
    5. 5
      +FloatingFatMan
      112
  • Tell a friend

    Love Neowin? Tell a friend!