CSS inconsistent behaviour

Discussion in 'HTML' started by Ian Davies, May 14, 2006.

  1. Ian Davies

    Ian Davies Guest

    I have a class in a style sheet to make text x-large.
    However it behaves differently on different pages. The text is large on one
    page, as it should be but not on the other even though the text on both
    pages uses the same style

    anyone know why this happens?
     
    Ian Davies, May 14, 2006
    #1
    1. Advertising

  2. Ian Davies

    Martin Jay Guest

    In message <%SC9g.2624$>, Ian Davies
    <> writes
    >I have a class in a style sheet to make text x-large.
    >However it behaves differently on different pages. The text is large on one
    >page, as it should be but not on the other even though the text on both
    >pages uses the same style
    >
    >anyone know why this happens?


    A URL would be helpful.

    Font sizes are relative to the size of their parent element, so the
    following two paragraphs have different font sizes, even though they
    both have a font-size of 'smaller.'

    <div style="font-size: 2em;">
    <p style="font-size: smaller;">Hello</p>
    </div>

    <div style="font-size: 1.5em;">
    <p style="font-size: smaller;">Hello</p>
    </div>

    --
    Martin Jay
    Phone/SMS: +44 7740 191877
    Fax: +44 870 432 5180
     
    Martin Jay, May 14, 2006
    #2
    1. Advertising

  3. Ian Davies

    Neredbojias Guest

    To further the education of mankind, "Ian Davies"
    <> vouchsafed:

    > I have a class in a style sheet to make text x-large.
    > However it behaves differently on different pages. The text is large
    > on one page, as it should be but not on the other even though the text
    > on both pages uses the same style
    >
    > anyone know why this happens?


    There are a number of reasons why it could happen but which one's the one
    is significant.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, May 14, 2006
    #3
  4. Ian Davies

    Ian Davies Guest

    Hello
    Thanks for the feedback
    I sorted it out. I had created a dynamic page in dreamweaver from a
    template and the following line is automatically placed at the top of the
    html

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    All my other pages I have either not used dreamweaver to create them or have
    deleted this line. On deleating the line the css style was displayed
    properly.
    Out of interest does anyone know what this line does exactly
    Ian

    "Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote in
    message news:Xns97C3493635FFFhttpwwwneredbojiasco@208.49.80.251...
    > To further the education of mankind, "Ian Davies"
    > <> vouchsafed:
    >
    > > I have a class in a style sheet to make text x-large.
    > > However it behaves differently on different pages. The text is large
    > > on one page, as it should be but not on the other even though the text
    > > on both pages uses the same style
    > >
    > > anyone know why this happens?

    >
    > There are a number of reasons why it could happen but which one's the one
    > is significant.
    >
    > --
    > Neredbojias
    > Infinity has its limits.
     
    Ian Davies, May 16, 2006
    #4
  5. Ian Davies

    Neredbojias Guest

    To further the education of mankind, "Ian Davies"
    <> vouchsafed:

    > Hello
    > Thanks for the feedback
    > I sorted it out. I had created a dynamic page in dreamweaver from a
    > template and the following line is automatically placed at the top of
    > the html
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    >
    > All my other pages I have either not used dreamweaver to create them
    > or have deleted this line. On deleating the line the css style was
    > displayed properly.
    > Out of interest does anyone know what this line does exactly
    > Ian
    >
    > "Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html>
    > wrote in message
    > news:Xns97C3493635FFFhttpwwwneredbojiasco@208.49.80.251...
    >> To further the education of mankind, "Ian Davies"
    >> <> vouchsafed:
    >>
    >> > I have a class in a style sheet to make text x-large.
    >> > However it behaves differently on different pages. The text is
    >> > large on one page, as it should be but not on the other even though
    >> > the text on both pages uses the same style
    >> >
    >> > anyone know why this happens?


    Get a load of this. That line puts browsers into "standards mode" with a
    somewhat-deprecated tag-set. The optimal method is to use the strict
    doctype which is similar but more accurate. Not including a doctype at all
    goads browsers into "quirks mode", -a sort of haphazard way of functioning
    peculiar to the particular browser at hand. Ergo, all your other pages are
    flawed and the one with the problem was acceptably correct.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, May 17, 2006
    #5
  6. Ian Davies

    Ian Davies Guest

    Thanks for that
    If my page is is a php dynamic page with html script where is the best place
    for the
    document type declaration to be put?
    Presumably if the the php file contains no html then presumably I would not
    need a document type declaration?

    Ian


    "Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote in
    message news:Xns97C5A8617AA40httpwwwneredbojiasco@208.49.80.251...
    > To further the education of mankind, "Ian Davies"
    > <> vouchsafed:
    >
    > > Hello
    > > Thanks for the feedback
    > > I sorted it out. I had created a dynamic page in dreamweaver from a
    > > template and the following line is automatically placed at the top of
    > > the html
    > >
    > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > > "http://www.w3.org/TR/html4/loose.dtd">
    > >
    > > All my other pages I have either not used dreamweaver to create them
    > > or have deleted this line. On deleating the line the css style was
    > > displayed properly.
    > > Out of interest does anyone know what this line does exactly
    > > Ian
    > >
    > > "Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html>
    > > wrote in message
    > > news:Xns97C3493635FFFhttpwwwneredbojiasco@208.49.80.251...
    > >> To further the education of mankind, "Ian Davies"
    > >> <> vouchsafed:
    > >>
    > >> > I have a class in a style sheet to make text x-large.
    > >> > However it behaves differently on different pages. The text is
    > >> > large on one page, as it should be but not on the other even though
    > >> > the text on both pages uses the same style
    > >> >
    > >> > anyone know why this happens?

    >
    > Get a load of this. That line puts browsers into "standards mode" with a
    > somewhat-deprecated tag-set. The optimal method is to use the strict
    > doctype which is similar but more accurate. Not including a doctype at

    all
    > goads browsers into "quirks mode", -a sort of haphazard way of functioning
    > peculiar to the particular browser at hand. Ergo, all your other pages

    are
    > flawed and the one with the problem was acceptably correct.
    >
    > --
    > Neredbojias
    > Infinity has its limits.
     
    Ian Davies, May 18, 2006
    #6
  7. Ian Davies

    Neredbojias Guest

    To further the education of mankind, "Ian Davies"
    <> vouchsafed:

    > Thanks for that
    > If my page is is a php dynamic page with html script where is the best
    > place for the
    > document type declaration to be put?
    > Presumably if the the php file contains no html then presumably I
    > would not need a document type declaration?


    If it generates html markup sent to the client as a page, the doctype
    should go at the top. Strict is:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    And yes, if the script doesn't generate a page, no doctype needed.

    --
    Neredbojias
    Infinity has its limits.
     
    Neredbojias, May 18, 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. Razvan

    Inconsistent behaviour

    Razvan, Oct 3, 2004, in forum: Java
    Replies:
    19
    Views:
    565
    Carl Howells
    Oct 11, 2004
  2. =?iso-8859-15?Q?Peter_Kn=F6rrich?=

    Inconsistent float behaviour on "inf" - current state?

    =?iso-8859-15?Q?Peter_Kn=F6rrich?=, Jun 27, 2006, in forum: Python
    Replies:
    1
    Views:
    452
    Scott David Daniels
    Jun 27, 2006
  3. Serengeti
    Replies:
    2
    Views:
    490
    Serengeti
    Nov 20, 2005
  4. Keith Thompson

    Inconsistent behaviour for (1 << 32)

    Keith Thompson, Oct 20, 2007, in forum: C Programming
    Replies:
    8
    Views:
    339
    Daniel Kraft
    Oct 20, 2007
  5. MB

    Inconsistent webservice behaviour

    MB, Dec 8, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    140
Loading...

Share This Page