DTD and CSS incompatibility?

Discussion in 'HTML' started by Attys Erebos, Oct 31, 2005.

  1. Attys Erebos

    Attys Erebos Guest

    Hello. I was recently doing a very simple website. I used a lot CSS;
    changing the font size for <h1> and <li>, positioning with an absolute
    value certain image,..

    I wrote the DTD only when the rest of the site was finished. But then,
    most of the CSS effects disappeared (but background-color for div still
    worked). This happened either with transitional or strict DTD.

    Why? Which DTD should I use? none?
     
    Attys Erebos, Oct 31, 2005
    #1
    1. Advertising

  2. Attys Erebos

    Jim Higson Guest

    Attys Erebos wrote:

    > Hello. I was recently doing a very simple website. I used a lot CSS;
    > changing the font size for <h1> and <li>, positioning with an absolute
    > value certain image,..
    >
    > I wrote the DTD only when the rest of the site was finished. But then,
    > most of the CSS effects disappeared (but background-color for div still
    > worked). This happened either with transitional or strict DTD.


    Which DTD, disappeared in which browser? Examples of HTML/CSS that
    disappeared?

    > Why? Which DTD should I use? none?


    Presumably because you put the browser out of quirks mode. There isn't much
    information to go on though.
     
    Jim Higson, Oct 31, 2005
    #2
    1. Advertising

  3. Attys Erebos

    Attys Erebos Guest

    Jim Higson wrote:
    > Attys Erebos wrote:
    >
    >
    >>Hello. I was recently doing a very simple website. I used a lot CSS;
    >>changing the font size for <h1> and <li>, positioning with an absolute
    >>value certain image,..
    >>
    >>I wrote the DTD only when the rest of the site was finished. But then,
    >>most of the CSS effects disappeared (but background-color for div still
    >>worked). This happened either with transitional or strict DTD.

    >
    >
    > Which DTD, disappeared in which browser? Examples of HTML/CSS that
    > disappeared?
    >
    >
    >>Why? Which DTD should I use? none?

    >
    >
    > Presumably because you put the browser out of quirks mode. There isn't much
    > information to go on though.

    I didn't explain it properly.
    Nothing disappeared, just didn't work.
    Examples of the CSS code that didn't work:
    font-size aplied to <h1> or <li>
    Browser: Mozilla firefox
    The DTDs I'm speaking about are those referred by the HTML 4.01
    specification: loose.dtd for transitional, and strict.dtd for strict.
     
    Attys Erebos, Oct 31, 2005
    #3
  4. Attys Erebos wrote:

    > I didn't explain it properly.


    I'm afraid your *still* aren't

    > Nothing disappeared, just didn't work.
    > Examples of the CSS code that didn't work:
    > font-size aplied to <h1> or <li>
    > Browser: Mozilla firefox
    > The DTDs I'm speaking about are those referred by the HTML 4.01
    > specification: loose.dtd for transitional, and strict.dtd for strict.


    a url please so we can actually *see* what you are doing and then we
    might have a chance at finding your error!

    Sorry if this sounds a little exasperated, but you wouldn't believe how
    often this happens in this NG, it's like playing "I spy with my little
    eye..."

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Oct 31, 2005
    #4
  5. Attys Erebos

    Jim Higson Guest

    Attys Erebos wrote:

    > Jim Higson wrote:
    >> Attys Erebos wrote:
    >>
    >>
    >>>Hello. I was recently doing a very simple website. I used a lot CSS;
    >>>changing the font size for <h1> and <li>, positioning with an absolute
    >>>value certain image,..
    >>>
    >>>I wrote the DTD only when the rest of the site was finished. But then,
    >>>most of the CSS effects disappeared (but background-color for div still
    >>>worked). This happened either with transitional or strict DTD.

    >>
    >>
    >> Which DTD, disappeared in which browser? Examples of HTML/CSS that
    >> disappeared?
    >>
    >>
    >>>Why? Which DTD should I use? none?

    >>
    >>
    >> Presumably because you put the browser out of quirks mode. There isn't
    >> much information to go on though.

    > I didn't explain it properly.
    > Nothing disappeared, just didn't work.
    > Examples of the CSS code that didn't work:
    > font-size aplied to <h1> or <li>
    > Browser: Mozilla firefox
    > The DTDs I'm speaking about are those referred by the HTML 4.01
    > specification: loose.dtd for transitional, and strict.dtd for strict.


    Have you validated the CSS and HTML to find any typos etc? It is likely the
    browser would be more tolerant to small mistakes in quirksmode, and this
    might be why your rules worked without a DTD.
     
    Jim Higson, Nov 1, 2005
    #5
    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. Joseph Tilian
    Replies:
    0
    Views:
    380
    Joseph Tilian
    Dec 21, 2004
  2. Ronald Fischer
    Replies:
    4
    Views:
    1,810
    Ronald Fischer
    Mar 17, 2005
  3. hannibal
    Replies:
    1
    Views:
    377
  4. Alan Sung
    Replies:
    3
    Views:
    929
    visage
    Aug 6, 2003
  5. test
    Replies:
    2
    Views:
    2,197
    Oliver Wong
    Jul 28, 2006
Loading...

Share This Page