Body not inheriting style from external CSS

Discussion in 'HTML' started by Lanmind, Sep 4, 2008.

  1. Lanmind

    Lanmind Guest

    Lanmind, Sep 4, 2008
    #1
    1. Advertising

  2. Lanmind wrote:
    > Hello all,
    >
    > I tried posting this in another HTML group but its not going through.
    > My problem is that the body of my HTML is not inheriting the body
    > style from the external CSS page. Any pointers is thanks : )
    >
    > Page- http://www.dockhawk.com/
    >
    > External CSS- http://www.dockhawk.com/default.css


    Rather than making us guess, could you tell us what you're seeing that
    differs from what you expected to see? Your rules for the body include
    one that sets the background color to white--and the background color is
    white--and two that set font properties--but you have no text on your
    page, except for the label on the submit button and any text I type into
    the field, which does look like 11px Arial (though you shouldn't
    normally set font sizes in terms of pixels).
     
    Harlan Messinger, Sep 4, 2008
    #2
    1. Advertising

  3. Lanmind wrote:
    > Hello all,
    >
    > I tried posting this in another HTML group but its not going through.
    > My problem is that the body of my HTML is not inheriting the body
    > style from the external CSS page. Any pointers is thanks : )
    >
    > Page- http://www.dockhawk.com/
    >
    > External CSS- http://www.dockhawk.com/default.css


    By the way: tags aren't part of the CSS, they're part of the HTML--and
    you're using the LINK tag in the HTML to reference the external style
    sheet. Remove the

    <style type=text/css>

    and

    </style> from your external sheet.
     
    Harlan Messinger, Sep 4, 2008
    #3
  4. Gazing into my crystal ball I observed Lanmind <>
    writing in news:d004ab43-6088-41e7-95ed-34bd18041077
    @a18g2000pra.googlegroups.com:

    > Hello all,
    >
    > I tried posting this in another HTML group but its not going through.
    > My problem is that the body of my HTML is not inheriting the body
    > style from the external CSS page. Any pointers is thanks : )
    >
    > Page- http://www.dockhawk.com/
    >
    > External CSS- http://www.dockhawk.com/default.css
    >


    External stylesheets do not have HTML elements, remove the <style
    type="text/css"> and </style>.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Sep 4, 2008
    #4
  5. Lanmind

    Lars Eighner Guest

    In our last episode,
    <>,
    the lovely and talented Lanmind
    broadcast on alt.html:

    > Hello all,


    > I tried posting this in another HTML group but its not going through.
    > My problem is that the body of my HTML is not inheriting the body
    > style from the external CSS page. Any pointers is thanks : )


    > Page- http://www.dockhawk.com/


    > External CSS- http://www.dockhawk.com/default.css


    Why do you have html STYLE tags in your external stylesheet?
    Is some kind of new IE extension or something> At any rate you advertised
    the sheet was css. <style> is not css. It is an html tag. Remove the tags
    and see if it works.

    You have no DOCTYPE. It appears to me you are trying to write some version
    of XHTML. You could not have attempted to validate your document without a
    DOCTYPE declaration, and I did not either. Without a DOCTYPE and a valid
    document, you will trigger quirks mode, and things may no appear as you
    think they should.


    --
    Lars Eighner <http://larseighner.com/>
    "I have never made but one prayer to God, a very short one: 'O Lord,
    make my enemies ridiculous.' And God granted it." --Voltaire
     
    Lars Eighner, Sep 4, 2008
    #5
  6. Lanmind

    Roy A. Guest

    On 4 Sep, 20:27, Harlan Messinger <>
    wrote:
    >
    > ... which does look like 11px Arial (though you shouldn't
    > normally set font sizes in terms of pixels).


    Why not? If you use CSS to set font size in terms of pixels, you
    should
    end up with a something close to 0.28 mm (in CSS terms). If not, the
    browser
    should adjust for it. It's in the specification, just look closer. An
    pixel
    is defined as an relative unit. It's not relative directly to an
    screen pixel,
    but it's relative. This feature, however, isn't implemented by most
    browsers,
    because they need accurate information from the OS. MS try to give
    users
    a choice, but Linux is ignoring the concept. Browsers can't do
    anything
    about it. Screen vendors comes with a recommendations which the user
    on
    an 17" monitor is ignoring, because he/she wants to have the maximum
    out of their graphic card, and want to use the setting for an 21"
    monitor.

    He/she who also is a savvy Linux user can't see the small prints.
    He/she is using FireFox and increase the font-size. It's all well,
    except from the small pictures. (An average Linux user have perfect
    vision, can See the smallest dots, but not normal fonts. They adjust
    the
    font-size but can't See the images. Oh, the images is in pixels, no
    wonder.)
     
    Roy A., Sep 4, 2008
    #6
  7. On 2008-09-04, Roy A. wrote:
    > On 4 Sep, 20:27, Harlan Messinger <>
    > wrote:
    >>
    >> ... which does look like 11px Arial (though you shouldn't
    >> normally set font sizes in terms of pixels).

    >
    > Why not? If you use CSS to set font size in terms of pixels, you
    > should
    > end up with a something close to 0.28 mm (in CSS terms). If not, the
    > browser
    > should adjust for it.


    Do you know of a browser that does that?

    > It's in the specification, just look closer. An pixel is defined as
    > an relative unit. It's not relative directly to an screen pixel,


    Citation?

    > but it's relative. This feature, however, isn't implemented by most
    > browsers,
    > because they need accurate information from the OS. MS try to give
    > users
    > a choice, but Linux is ignoring the concept. Browsers can't do
    > anything
    > about it. Screen vendors comes with a recommendations which the user
    > on
    > an 17" monitor is ignoring, because he/she wants to have the maximum
    > out of their graphic card, and want to use the setting for an 21"
    > monitor.


    I want to use the best resolution my monitor supports. What's
    wrong with that? On my 17" monitor 1280px wide is possible; there
    is nothing that says that 1280 is only for 21" monitors.

    > He/she who also is a savvy Linux user can't see the small prints.
    > He/she is using FireFox and increase the font-size. It's all well,
    > except from the small pictures. (An average Linux user have perfect
    > vision, can See the smallest dots, but not normal fonts. They adjust
    > the
    > font-size but can't See the images. Oh, the images is in pixels, no
    > wonder.)


    Which is why I have started specifying image widths in
    percentages.

    --
    Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
     
    Chris F.A. Johnson, Sep 4, 2008
    #7
  8. Lanmind

    Bergamot Guest

    Chris F.A. Johnson wrote:
    > On 2008-09-04, Roy A. wrote:
    >> On 4 Sep, 20:27, Harlan Messinger <>
    >> wrote:

    >
    >> An pixel is defined as
    >> an relative unit. It's not relative directly to an screen pixel,

    >
    > Citation?


    Assuming he means a px unit is supposed to be relative:
    http://www.w3.org/TR/CSS21/syndata.html#length-units

    >> This feature, however, isn't implemented by most
    >> browsers


    This is also correct, so the reality is 1px = 1 screen pixel, even
    though that doesn't follow the specs.

    --
    Berg
     
    Bergamot, Sep 4, 2008
    #8
  9. Roy A. wrote:
    > On 4 Sep, 20:27, Harlan Messinger <>
    > wrote:
    >> ... which does look like 11px Arial (though you shouldn't
    >> normally set font sizes in terms of pixels).

    >
    > Why not?


    Check the 15,000 discussions that have already been held on this topic.

    > If you use CSS to set font size in terms of pixels, you
    > should
    > end up with a something close to 0.28 mm (in CSS terms).


    "Should". And it still doesn't explain why fonts shouldn't be set to
    take into consideration the user's preferences.


    If not, the
    > browser
    > should adjust for it. It's in the specification, just look closer. An
    > pixel
    > is defined as an relative unit. It's not relative directly to an
    > screen pixel,
    > but it's relative. This feature, however, isn't implemented by most
    > browsers,
    > because they need accurate information from the OS. MS try to give
    > users
    > a choice, but Linux is ignoring the concept. Browsers can't do
    > anything
    > about it. Screen vendors comes with a recommendations which the user
    > on
    > an 17" monitor is ignoring, because he/she wants to have the maximum
    > out of their graphic card, and want to use the setting for an 21"
    > monitor.


    "Recommendation" here is obviously not that strong a term. Certainly a
    variety of settings is offered because it's understood that users have
    different *preferences* (not to mention *needs*). You give the
    impression of having the opinion that it is the user whose
    responsibility it is not to thwart the intentions of the manufacturer or
    the web designer. That isn't a constructive view.
     
    Harlan Messinger, Sep 4, 2008
    #9
  10. Lanmind

    Roy A. Guest

    On 4 Sep, 23:06, "Chris F.A. Johnson" <> wrote:
    > On 2008-09-04, Roy A. wrote:
    >
    > > On 4 Sep, 20:27, Harlan Messinger <>
    > > wrote:

    >
    > >> ... which does look like 11px Arial (though you shouldn't
    > >> normally set font sizes in terms of pixels).

    >
    > > Why not? If you use CSS to set font size in terms of pixels, you
    > > should
    > > end up with a something close to 0.28 mm (in CSS terms). If not, the
    > > browser
    > > should adjust for it.

    >
    >       Do you know of a browser that does that?
    >

    Op5Mac did, IE5/Mac gave the user a chose between 1/72 and 1/96
    piksels per
    inch. No one got it right. It's depends on what the OS is saying.
    >
    > > It's in the specification, just look closer. An pixel is defined as
    > > an relative unit. It's not relative directly to an screen pixel,

    >
    >       Citation?


    CSS2 ?

    > > but it's relative. This feature, however, isn't implemented by most
    > > browsers,
    > > because they need accurate information from the OS. MS try to give
    > > users
    > > a choice, but Linux is ignoring the concept. Browsers can't do
    > > anything
    > > about it. Screen vendors comes with a recommendations which the user
    > > on
    > > an 17" monitor is ignoring, because he/she wants to have the maximum
    > > out of their graphic card, and want to use the setting for an 21"
    > > monitor.

    >
    >      I want to use the best resolution my monitor supports. What's
    >      wrong with that? On my 17" monitor 1280px wide is possible; there
    >      is nothing that says that 1280 is only for 21" monitors.


    Oh. It's nothing wrong with that. Resolution is about quality, not
    about size.
    At least that you have to agree on. The problem arises when you think
    about
    pixels as a measure of size. Well, your OS don't give a shit (MS try
    to) but
    thats all. On a PDAs meant to read e-books, this will be an issue. On
    an PDA you're holding your screen closer to your face, if we're
    reading
    a book, we also want the quality to be better. (There you go, the CSS
    spesification don't say anything how an pixel relate to an dot on a
    printer, you see?). I know this is controversial, but it's in the
    specificatons:

    "Pixel units are relative to the resolution of the viewing device,
    i.e., most often a computer display. If the pixel density of the
    output device is very different from that of a typical computer
    display, the user agent should rescale pixel values."

    http://www.w3.org/TR/REC-CSS2/syndata.html#em-width
    http://www.w3.org/TR/REC-CSS2/images/pixel1.gif

    As usual, user agents can do what thay want, the key word is "very
    different". As I
    see it, it's up to the "user agent" to decide.

    >      Which is why I have started specifying image widths in
    >      percentages.


    They do it on the Web Accessibility Initiative (WAI) homepage too.
    http://www.w3.org/WAI/

    If the text is to small to read, the images is too.

    And no, don't use pixels.
     
    Roy A., Sep 4, 2008
    #10
  11. Lanmind

    Roy A. Guest

    On 4 Sep, 23:06, "Chris F.A. Johnson" <> wrote:
    > On 2008-09-04, Roy A. wrote:
    >
    > > On 4 Sep, 20:27, Harlan Messinger <>
    > > wrote:

    >
    > >> ... which does look like 11px Arial (though you shouldn't
    > >> normally set font sizes in terms of pixels).

    >
    > > Why not? If you use CSS to set font size in terms of pixels, you
    > > should
    > > end up with a something close to 0.28 mm (in CSS terms). If not, the
    > > browser
    > > should adjust for it.

    >
    >       Do you know of a browser that does that?
    >

    Op5Mac did, IE5/Mac gave the user a chose between 1/72 and 1/96
    piksels per
    inch. No one got it right. It's depends on what the OS is saying.
    >
    > > It's in the specification, just look closer. An pixel is defined as
    > > an relative unit. It's not relative directly to an screen pixel,

    >
    >       Citation?


    CSS2 ?

    > > but it's relative. This feature, however, isn't implemented by most
    > > browsers,
    > > because they need accurate information from the OS. MS try to give
    > > users
    > > a choice, but Linux is ignoring the concept. Browsers can't do
    > > anything
    > > about it. Screen vendors comes with a recommendations which the user
    > > on
    > > an 17" monitor is ignoring, because he/she wants to have the maximum
    > > out of their graphic card, and want to use the setting for an 21"
    > > monitor.

    >
    >      I want to use the best resolution my monitor supports. What's
    >      wrong with that? On my 17" monitor 1280px wide is possible; there
    >      is nothing that says that 1280 is only for 21" monitors.


    Oh. It's nothing wrong with that. Resolution is about quality, not
    about size.
    At least that you have to agree on. The problem arises when you think
    about
    pixels as a measure of size. Well, your OS don't give a shit (MS try
    to) but
    thats all. On a PDAs meant to read e-books, this will be an issue. On
    an PDA you're holding your screen closer to your face, if we're
    reading
    a book, we also want the quality to be better. (There you go, the CSS
    spesification don't say anything how an pixel relate to an dot on a
    printer, you see?). I know this is controversial, but it's in the
    specificatons:

    "Pixel units are relative to the resolution of the viewing device,
    i.e., most often a computer display. If the pixel density of the
    output device is very different from that of a typical computer
    display, the user agent should rescale pixel values."

    http://www.w3.org/TR/REC-CSS2/syndata.html#em-width
    http://www.w3.org/TR/REC-CSS2/images/pixel1.gif

    As usual, user agents can do what thay want, the key word is "very
    different". As I
    see it, it's up to the "user agent" to decide.

    >      Which is why I have started specifying image widths in
    >      percentages.


    They do it on the Web Accessibility Initiative (WAI) homepage too.
    http://www.w3.org/WAI/

    If the text is to small to read, the images is too.

    And no, don't use pixels.
     
    Roy A., Sep 4, 2008
    #11
  12. Lanmind

    Lanmind Guest

    Thanks all,

    I was out of town, I don't know why I put those style tags in there.
    All better.
     
    Lanmind, Sep 8, 2008
    #12
  13. Lanmind

    Lanmind Guest

    Thanks all,

    I was out of town, I don't know why I put those style tags in there.
    All better.
     
    Lanmind, Sep 8, 2008
    #13
    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. Lanmind

    Div not inheriting body style

    Lanmind, Sep 9, 2008, in forum: HTML
    Replies:
    3
    Views:
    723
    Harlan Messinger
    Sep 9, 2008
  2. Tom
    Replies:
    5
    Views:
    108
    Fabian
    Nov 25, 2003
  3. London Boy
    Replies:
    2
    Views:
    335
    Keith Bowes
    Jan 12, 2004
  4. Replies:
    12
    Views:
    319
    Robert Mark Bram
    Dec 3, 2004
  5. Nik Coughlin
    Replies:
    2
    Views:
    179
    Nik Coughlin
    Jan 23, 2008
Loading...

Share This Page