How define the fonts for the whole table?

Discussion in 'HTML' started by Manfred Ullrich, Mar 11, 2006.

  1. the font-definition outside the table is not valid within the table.
    I have to define it in every <td> within the table..
    Isn't it possible to define it once for the whole table?

    Thanks, Manfred
     
    Manfred Ullrich, Mar 11, 2006
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed "Manfred Ullrich"
    <> writing in news:4412984a$0$12927$9b4e6d93
    @newsread4.arcor-online.net:

    > the font-definition outside the table is not valid within the table.
    > I have to define it in every <td> within the table..
    > Isn't it possible to define it once for the whole table?
    >
    > Thanks, Manfred
    >
    >
    >


    Sure.

    table {font-family: arial, verdana, sans-serif; font-size:100%;}

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 11, 2006
    #2
    1. Advertising

  3. "Adrienne Boswell" <> schrieb im Newsbeitrag news:Xns978311CA5A948arbpenyahoocom@69.28.186.121...
    > Gazing into my crystal ball I observed "Manfred Ullrich"
    > <> writing in news:4412984a$0$12927$9b4e6d93
    > @newsread4.arcor-online.net:
    >
    > > the font-definition outside the table is not valid within the table.
    > > I have to define it in every <td> within the table..
    > > Isn't it possible to define it once for the whole table?
    > >
    > > Thanks, Manfred
    > >
    > >
    > >

    >
    > Sure.
    >
    > table {font-family: arial, verdana, sans-serif; font-size:100%;}
    >

    I suppose your hint only works with stylesheets.
    Isn't it possible to manage the problem without stylesheets?

    Thanks, Manfred
     
    Manfred Ullrich, Mar 11, 2006
    #3
  4. Manfred Ullrich

    Greg N. Guest

    Manfred Ullrich wrote:

    >>table {font-family: arial, verdana, sans-serif; font-size:100%;}

    >
    > I suppose your hint only works with stylesheets.
    > Isn't it possible to manage the problem without stylesheets?


    If it is external style sheets that you're uncomfortable with, you can
    put a style section within the <head> part of your document:

    <head>
    <style type="text/css">
    table {font-family: arial, verdana, sans-serif; font-size:100%;}
    </style>
    </head>

    And if you feel that's still too exotic, you can put the style attribute
    in the <table> tag itself, like so:

    <table style="font-family: sans-serif; font-size:100%;}">

    --
    Gregor mit dem Motorrad auf Reisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 11, 2006
    #4
  5. Manfred Ullrich

    Greg N. Guest

    Greg N. wrote:

    > <table style="font-family: sans-serif; font-size:100%;}">


    Oops, sorry. Make that
    <table style="font-family: sans-serif; font-size:100%;">


    --
    Gregor mit dem Motorrad auf Reisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Mar 11, 2006
    #5
  6. Manfred Ullrich

    Toby Inkster Guest

    Manfred Ullrich wrote:

    > I suppose your hint only works with stylesheets.
    > Isn't it possible to manage the problem without stylesheets?


    Why? Using stylesheets is so much easier.

    This is 2006, not 1996. CSS has wide support.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 11, 2006
    #6
  7. "Greg N." <> schrieb im Newsbeitrag news:duufpt$eim$...
    > Greg N. wrote:
    >
    > > <table style="font-family: sans-serif; font-size:100%;}">

    >
    > Oops, sorry. Make that
    > <table style="font-family: sans-serif; font-size:100%;">
    >

    Thank you,
    I think when more than one table is on a page than this is the only way to treat the tables differently.
    Isn't it?

    Regards, Manfred
     
    Manfred Ullrich, Mar 11, 2006
    #7
  8. Manfred Ullrich

    Toby Inkster Guest

    Manfred Ullrich wrote:

    > I think when more than one table is on a page than this is the only way
    > to treat the tables differently. Isn't it?


    Nope.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Mar 11, 2006
    #8
  9. Manfred Ullrich wrote:

    > "Greg N." <> schrieb im Newsbeitrag news:duufpt$eim$...
    >
    >>Greg N. wrote:
    >>
    >>
    >>><table style="font-family: sans-serif; font-size:100%;}">

    >>
    >>Oops, sorry. Make that
    >><table style="font-family: sans-serif; font-size:100%;">
    >>

    > Thank you,
    > I think when more than one table is on a page than this is the only way to treat the tables differently.
    > Isn't it?


    No, if you have more than one table that your wish to style differently
    they you can style by 'id' or 'class'.

    CSS:
    ..naked {
    border: 0;
    border-collapse: collapse;
    }

    ..naked TD { padding .5em; }

    ..funky {
    border: 5px dotted red;
    border-collapse: separate;
    border-spacing: 1em;
    }

    ..funky TD {
    color: lime;
    background-color: black;
    border: 10px solid yellow;
    }


    HTML:
    <table class="naked">
    <tr><td>Table</td><td>Has</td></tr>
    <tr><td>No</td><td>borders</td></tr>
    </table>

    <table class="funky">
    <tr><td>Table</td><td>Has</td></tr>
    <tr><td>borders</td><td>but</td></tr>
    <tr><td>is</td><td>UGLY</td></tr>
    </table>


    By having the CSS in a separate file you can change the look of your
    site by only having to change ONE file.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 11, 2006
    #9
  10. Manfred Ullrich

    Stan McCann Guest

    "Manfred Ullrich" <> wrote in
    news:4412b11f$0$12228$-online.net:

    >
    > "Adrienne Boswell" <> schrieb im Newsbeitrag
    > news:Xns978311CA5A948arbpenyahoocom@69.28.186.121...
    >> Gazing into my crystal ball I observed "Manfred Ullrich"
    >> <> writing in news:4412984a$0$12927$9b4e6d93
    >> @newsread4.arcor-online.net:
    >>
    >> > the font-definition outside the table is not valid within the
    >> > table. I have to define it in every <td> within the table..
    >> > Isn't it possible to define it once for the whole table?
    >> >

    >> Sure.
    >>
    >> table {font-family: arial, verdana, sans-serif; font-size:100%;}


    Correct modern standard way (although I would lose the verdana).

    >>

    > I suppose your hint only works with stylesheets.
    > Isn't it possible to manage the problem without stylesheets?


    It certainly is possible. But, if you go to your home builder and tell
    him, "I don't want to use wood and shingle, I want to use straw on the
    roof, isn't it possible?" Do you want to do it the standard way (the
    way most that read/post here frequently),(the way most modern
    construction companies work), or the 10 year (1000 years?) old way?

    --
    Stan McCann, "Uncle Pirate" http://stanmccann.us/
    Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
    Now blocking Google Grouper posts and replies.
    http://blinkynet.net/comp/uip5.html
     
    Stan McCann, Mar 11, 2006
    #10
  11. Manfred Ullrich

    Stan McCann Guest

    "Greg N." <> wrote in news:duufpt$eim$:

    > Greg N. wrote:
    >
    >> <table style="font-family: sans-serif; font-size:100%;}">

    >
    > Oops, sorry. Make that
    > <table style="font-family: sans-serif; font-size:100%;">
    >
    >


    Oops, I missed that too. <slapping forehead>Duh!</slapping forehead>

    --
    Stan McCann, "Uncle Pirate" http://stanmccann.us/
    Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
    Now blocking Google Grouper posts and replies.
    http://blinkynet.net/comp/uip5.html
     
    Stan McCann, Mar 11, 2006
    #11
  12. Manfred Ullrich

    dorayme Guest

    In article <Xns978311CA5A948arbpenyahoocom@69.28.186.121>,
    Adrienne Boswell <> wrote:

    > Gazing into my crystal ball I observed "Manfred Ullrich"
    > <> writing in news:4412984a$0$12927$9b4e6d93
    > @newsread4.arcor-online.net:
    >
    > > the font-definition outside the table is not valid within the table.
    > > I have to define it in every <td> within the table..
    > > Isn't it possible to define it once for the whole table?
    > >
    > > Thanks, Manfred
    > >
    > >
    > >

    >
    > Sure.
    >
    > table {font-family: arial, verdana, sans-serif; font-size:100%;}


    Just a small side matter here, if I may...

    Should this suggestion not be:

    table {font-family: Arial, Verdana, sans-serif; font-size:100%;} ?

    On the ground that the font name does not "belong" to css (things
    that do so "belong" are case insensitive)

    --
    dorayme
     
    dorayme, Mar 11, 2006
    #12
  13. Manfred Ullrich

    dorayme Guest

    In article
    <4412b11f$0$12228$-online.net>,
    "Manfred Ullrich" <> wrote:

    > > table {font-family: arial, verdana, sans-serif; font-size:100%;}
    > >

    > I suppose your hint only works with stylesheets.
    > Isn't it possible to manage the problem without stylesheets?


    Ah! So that's your game... :)

    --
    dorayme
     
    dorayme, Mar 11, 2006
    #13
  14. While the city slept, Manfred Ullrich () feverishly
    typed...
    > I suppose your hint only works with stylesheets.
    > Isn't it possible to manage the problem without stylesheets?


    Now... why on Earth would you want to do that???

    Cheers,
    Nige

    --
    Nigel Moss http://www.nigenet.org.uk
    Mail address will bounce. | Take the DOG. out!
    "Your mother ate my dog!", "Not all of him!"
     
    nice.guy.nige, Mar 12, 2006
    #14
  15. Gazing into my crystal ball I observed dorayme
    <> writing in news:doraymeRidThis-
    :

    >> table {font-family: arial, verdana, sans-serif; font-size:100%;}

    >
    > Just a small side matter here, if I may...
    >
    > Should this suggestion not be:
    >
    > table {font-family: Arial, Verdana, sans-serif; font-size:100%;} ?
    >
    > On the ground that the font name does not "belong" to css (things
    > that do so "belong" are case insensitive)
    >


    Maybe. For me, it's a writing style. I write just about everything
    (markup/scripting) in lower case, with the exception of SQL keywords.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 12, 2006
    #15
  16. Manfred Ullrich

    dorayme Guest

    In article <Xns9783DA4546A9Barbpenyahoocom@69.28.186.121>,
    Adrienne Boswell <> wrote:

    > Gazing into my crystal ball I observed dorayme
    > <> writing in news:doraymeRidThis-
    > :
    >
    > >> table {font-family: arial, verdana, sans-serif; font-size:100%;}

    > >
    > > Just a small side matter here, if I may...
    > >
    > > Should this suggestion not be:
    > >
    > > table {font-family: Arial, Verdana, sans-serif; font-size:100%;} ?
    > >
    > > On the ground that the font name does not "belong" to css (things
    > > that do so "belong" are case insensitive)
    > >

    >
    > Maybe. For me, it's a writing style. I write just about everything
    > (markup/scripting) in lower case, with the exception of SQL keywords.


    Well, I was wondering if, when we do this, it works fine only by
    the grace of browsers (which might not be actually obliged to
    recognise a font name in lower case? URLs are case sensitive and
    occur in css, they will not always work well (online) if the
    capital letters that are "supposed" to be in them are rendered as
    lower case. In this latter, it would be unwise to adopt your
    "writing style". But perhaps there is a different issue involved
    in font names... perhaps the css somehow passes a request to the
    system of the particular user's computer and the request is
    "case-insensitive" (sensibly, what would be the chance of 2
    fonts, verdana and Verdana)

    --
    dorayme
     
    dorayme, Mar 12, 2006
    #16
  17. Gazing into my crystal ball I observed dorayme
    <> writing in news:doraymeRidThis-
    :

    > In article <Xns9783DA4546A9Barbpenyahoocom@69.28.186.121>,
    > Adrienne Boswell <> wrote:
    >
    >> Gazing into my crystal ball I observed dorayme
    >> <> writing in news:doraymeRidThis-
    >> :
    >>
    >> >> table {font-family: arial, verdana, sans-serif; font-size:100%;}
    >> >
    >> > Just a small side matter here, if I may...
    >> >
    >> > Should this suggestion not be:
    >> >
    >> > table {font-family: Arial, Verdana, sans-serif; font-size:100%;} ?
    >> >
    >> > On the ground that the font name does not "belong" to css (things
    >> > that do so "belong" are case insensitive)
    >> >

    >>
    >> Maybe. For me, it's a writing style. I write just about everything
    >> (markup/scripting) in lower case, with the exception of SQL keywords.

    >
    > Well, I was wondering if, when we do this, it works fine only by
    > the grace of browsers (which might not be actually obliged to
    > recognise a font name in lower case? URLs are case sensitive and
    > occur in css, they will not always work well (online) if the
    > capital letters that are "supposed" to be in them are rendered as
    > lower case. In this latter, it would be unwise to adopt your
    > "writing style". But perhaps there is a different issue involved
    > in font names... perhaps the css somehow passes a request to the
    > system of the particular user's computer and the request is
    > "case-insensitive" (sensibly, what would be the chance of 2
    > fonts, verdana and Verdana)
    >


    CSS itself is case sensitive, so #MyHeader and <h1 id="myheader"> are not
    the same. I found the out the hard way. Another one of the reasons I don't
    like mixed case.

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Mar 12, 2006
    #17
  18. On Mon, 13 Mar 2006, dorayme wrote:

    > In article <Xns9783DA4546A9Barbpenyahoocom@69.28.186.121>,
    > Adrienne Boswell <> wrote:
    >
    > > Maybe. For me, it's a writing style. I write just about everything
    > > (markup/scripting) in lower case, with the exception of SQL keywords.

    >
    > Well, I was wondering if, when we do this, it works fine only by
    > the grace of browsers (which might not be actually obliged to
    > recognise a font name in lower case?


    The way in which a user agent matches a CSS font-family description
    with one of the available fonts is deliberately not specified in
    detail: it's left to implementers to decide how to make the best
    match. For example, what should happen if the CSS specifies "Times",
    and the user has "Times New Roman" (and not "Times")?

    It stands to reason, though, that if a font is named "FooBar", then
    the *best* way to match it, across different browsers and font
    management systems, is by specifying "FooBar", rather than maybe
    "foobar" or "Foobar" or "FOOBAR".

    > URLs are case sensitive and occur in css, they will not always work
    > well (online) if the capital letters that are "supposed" to be in
    > them are rendered as lower case.


    This kind of analogy is not, in general, helpful. One has to consult
    the actual specifications to know what is intended[1]

    Sure: URLs are case-sensitive, by definition. But font name matching
    is not so clearly defined.

    > (sensibly, what would be the chance of 2 fonts, verdana and Verdana)


    Well, I've got a font family called "Monospace". CSS understands
    monospace as a font keyword. They aren't (necessarily) the same font.
    And the browsers know it.

    h t h

    [1] and then, I'm afraid, one usually has to examine MS's Operating
    System Component, to see which of the mandatory requirements they
    decided to break *this* time - fortunately, the other browser
    developers can't afford to spit in the face of the specifications in
    that way, so there's normally only that one troublemaker to worry
    about.
     
    Alan J. Flavell, Mar 12, 2006
    #18
  19. Manfred Ullrich

    dorayme Guest

    In article <Xns978488B34C85Earbpenyahoocom@69.28.186.121>,
    Adrienne Boswell <> wrote:

    > CSS itself is case sensitive, so #MyHeader and <h1 id="myheader"> are not
    > the same. I found the out the hard way. Another one of the reasons I don't
    > like mixed case.


    Well, I think it is more true to say "CSS itself" is case
    insensitive. There are special issues surrounding ids and classes
    re their interpretation by browsers and the html (which has case
    sensitivities). I still wonder about your use of "verdana"? It
    looks wrong to me.

    Generally I find it helpful to use case for readability, as in
    #featuresColumn { etc in the CSS and id="featuresColumn" in the
    html. But just be very consistent in this across in the html.
    Yes, I realise you like to avoid the need by using all lower...

    In the above name, #featuresColumn and #featurescolumn would be
    quite the same as far as the CSS is concerned:

    eg. one could have #featuresColumn p {color:red} and later in the
    CSS sheet (or in a supplementary sheet), #featurescolumn p
    {color:blue}

    As far as the css is saying, all p paras in the id that is spelt
    f e a t u r e s c o l u m n should be blue.

    Browsers will react differently according to how they read the
    standards, since ids and classes are mentioned in both css and
    html, the former being case insensitive the latter sometimes at
    least being case sensitive, there is somewhat a conflict of
    interest.

    --
    dorayme
     
    dorayme, Mar 12, 2006
    #19
    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. Don Wash
    Replies:
    7
    Views:
    10,894
    Ashish M Bhonkiya
    Aug 30, 2004
  2. Itamar Lev
    Replies:
    0
    Views:
    368
    Itamar Lev
    Jul 14, 2004
  3. UJ
    Replies:
    8
    Views:
    61,925
  4. \A_Michigan_User\
    Replies:
    2
    Views:
    938
    \A_Michigan_User\
    Aug 21, 2006
  5. sam
    Replies:
    0
    Views:
    443
Loading...

Share This Page