CSS not visible with XHTML decleration

Discussion in 'HTML' started by peteraward@gmail.com, Sep 28, 2006.

  1. Guest

    I have the following XHTML, and it links to page.css (which does
    exist). Before I put in the xml decleration, doctype and html, it
    worked. Now, the css is ignored. (FF1507Win98)

    Any ideas?

    --------------
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>My Home Page</title>
    <link rel="stylesheet" type="text/css" title="Blue and Orange"
    href="page.css" />
    </head>
    <body>
    <h1 id="PageTitle"><span>Smarty example website - My Home
    Page</span></h1>
    <div id="MainText">
    Hello Peoples.
    </div>

    <h1 id="FooterText">This website, it's design, contents, data and
    concept are the copyright material of Peter Ward.</h1>

    </body>
    </html>

    -----------------
    page.css:

    body { overflow: hidden; background-color: #ABCDEF; color: #339900; }
    #PageTitle { text-align: center; font-weight: normal; color: #339900;
    background-color: #FF9900; border: solid #D5B377 4px; }
    #MainText { position: absolute; top: 20%; left: 10%; width: 80%;
    padding: 0px; margin: 0px; text-align: center; font-size: 28pt; color:
    #339900; background-color: #FEDCBA; border: solid #D4D4D4 4px; }
    #FooterText { position: absolute; bottom: 0px; left: 0px; width: 104%;
    height: 28px; padding: 0px; margin: 0px; text-align: center; font-size:
    14pt; background-color: #000000; color: #FFFFFF; }
    , Sep 28, 2006
    #1
    1. Advertising

  2. Els Guest

    wrote:

    > I have the following XHTML, and it links to page.css (which does
    > exist). Before I put in the xml decleration, doctype and html, it
    > worked. Now, the css is ignored. (FF1507Win98)
    >
    > Any ideas?


    [snip code]

    Please provide an online example that shows this behaviour, so people
    don't have to jump through hoops[1] to help you.

    ____
    [1] copy your HTML, paste it in a file, save it, copy your CSS, paste
    it in a file, save it, upload two files to a webserver, see what
    happens in the browser...

    --
    Els http://locusmeus.com/
    accessible web design: http://locusoptimus.com/

    Now playing: Elly & Rikkert - Op de wolken
    Els, Sep 28, 2006
    #2
    1. Advertising

  3. Andy Dingley Guest

    wrote:

    > Any ideas?


    I think you've posted this far too much for anyone to want to bother
    helping you any more.
    <plonk>


    Here's a clue though:

    If you don't understand XHTML, just don't use it.

    If you don't understand why XHTML 1.1 isn't usable yet, then you don't
    understand XHTML.
    Andy Dingley, Sep 28, 2006
    #3
  4. Dan Guest

    wrote:
    > I have the following XHTML, and it links to page.css (which does
    > exist). Before I put in the xml decleration, doctype and html, it
    > worked. Now, the css is ignored. (FF1507Win98)


    How about posting your request a few dozen more times? Somebody in
    Outer Mongolia might still have failed to notice it.

    One possible cause is if your server isn't serving the CSS under the
    proper MIME type (text/css); Mozilla browsers will ignore such
    stylesheets unless "quirks mode" is active (based on the page doctype).

    --
    Dan
    Dan, Sep 28, 2006
    #4
  5. Guest

    Except that I have used XHTML 1.1 elsewhere and been able to use CSS
    with it in the same way, same browser, and have it actually work.

    And I didn't see my message appear within 5 minutes, so I assumed that
    Google Groups had got an error in it's coding somewhere, given that it
    asked for my password every second page.

    It doesn't work with XHTML 1.0 either.

    But it does work when no standard decleration is used.

    Andy Dingley wrote:
    > wrote:
    >
    > > Any ideas?

    >
    > I think you've posted this far too much for anyone to want to bother
    > helping you any more.
    > <plonk>
    >
    >
    > Here's a clue though:
    >
    > If you don't understand XHTML, just don't use it.
    >
    > If you don't understand why XHTML 1.1 isn't usable yet, then you don't
    > understand XHTML.
    , Sep 28, 2006
    #5
  6. jojo Guest

    wrote:

    >>> Any ideas?
    >>>

    >> I think you've posted this far too much for anyone to want to bother
    >> helping you any more.
    >> <plonk>
    >>
    >> Here's a clue though:
    >>
    >> If you don't understand XHTML, just don't use it.
    >>
    >> If you don't understand why XHTML 1.1 isn't usable yet, then you don't
    >> understand XHTML.

    >
    > Except that I have used XHTML 1.1 elsewhere


    Which does not proof that you understand it but the opposite: You do not
    know why XHTML 1.1 isn't usable yet...

    > and been able to use CSS
    > with it in the same way, same browser, and have it actually work.


    Perhaps it worked... but in all browsers? and with the correct MIME-type
    for *X*HTML?

    > And I didn't see my message appear within 5 minutes, so I assumed that
    > Google Groups had got an error in it's coding somewhere, given that it
    > asked for my password every second page.


    Use a newsreader instead of googlegroups... but just a hint... ;-)
    And BTW: please do not "top post", make sure your reply is *below* the
    quote! then you can read a post from the top to the bottom instead of
    the way round, improves readability... Thank you.

    > It doesn't work with XHTML 1.0 either.


    Why don't you just use HTML?

    > But it does work when no standard decleration is used.


    Perhaps for some reason you need the quirks-mode? does your site
    validate? (sorry, I had no time to check it myself..)
    jojo, Sep 28, 2006
    #6
  7. Andy Dingley Guest

    wrote:

    > Except that I have used XHTML 1.1 elsewhere and been able to use CSS
    > with it in the same way, same browser, and have it actually work.


    Web authors regularly "use" a badly mangled hybrid of HTML 2 and MS
    Orifice, and even that manages to "actually work".

    The question is, is it _correct_. Of course it merely "works". For
    some value of "works", on at least one machine, in one location. If we
    hope to make it work worldwide, on a good range of browsers and similar
    devices, and to keep working for the forseeable future, then we have to
    do better than merely getting it to behave itself long enough to watch
    it work just the once. We have to start thinking about objective
    standards.

    > And I didn't see my message appear within 5 minutes, so I assumed that
    > Google Groups had got an error in it's coding somewhere,


    Thankyou for that. So why did you multi-post to different ngs too?


    > But it does work when no standard decleration is used.


    What's a "standard decleration" ?

    CSS works with XHTML. Now I know _you're_ infallible (you can even tell
    when Google is broken, knowing that you need to re-post your wisdom to
    it), but have you not considered for a moment the idea that this stuff
    _works_, and that if it didn't, it would have been fixed? Guess what -
    _you_ are doing something wrong.

    Go and learn how to use XHTML.
    Go and learn how to use XHTML on the web (this is currently different)
    Go and learn why XHTML 1.1 doesn't work for the web.

    If you do all this, and the web is stil broken for you (after all, it
    couldn't be your fault), then when you come back remember to post a URL
    to the site because we can't diagnose this sort of complex issue from a
    short fragment alone.

    Don't forget to multi-post your replies too, just in case you catch
    Google stop working again.
    Andy Dingley, Sep 29, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    399
  2. Tapeesh

    extern decleration intialization

    Tapeesh, Nov 10, 2005, in forum: C Programming
    Replies:
    17
    Views:
    833
    Chris Torek
    Nov 12, 2005
  3. xhtml champs
    Replies:
    0
    Views:
    438
    xhtml champs
    Aug 1, 2011
  4. xhtml champs
    Replies:
    0
    Views:
    1,007
    xhtml champs
    Aug 2, 2011
  5. Jurjen de Groot
    Replies:
    0
    Views:
    284
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page