No background?

Discussion in 'HTML' started by Frogleg, Jun 21, 2004.

  1. Frogleg

    Frogleg Guest

    I just went to the W3C Validator and it tells me:

    Line 50, column 75: there is no attribute "BACKGROUND"

    ...." cellspacing="0" width="100%"
    background="images/grad4bopaque.gif">

    (The page is supposed to be HTML 4.01 Transitional.)

    Could someone please explain this without saying "don't use tables;
    use CSS"?
     
    Frogleg, Jun 21, 2004
    #1
    1. Advertising

  2. Frogleg wrote:
    > I just went to the W3C Validator and it tells me:
    > Line 50, column 75: there is no attribute "BACKGROUND"
    > ..." cellspacing="0" width="100%"
    > background="images/grad4bopaque.gif">
    > (The page is supposed to be HTML 4.01 Transitional.)


    It appears that "background" only applies to <body>:
    http://www.w3.org/TR/html401/index/attributes.html

    You can apply a background image to a table using CSS. (You need to get the
    image path relative to the CSS path, not the document path).

    table {
    background-image: url("images/grad4bopaque.gif");
    }

    > Could someone please explain this without saying "don't use tables;
    > use CSS"?


    Always use CSS. And *also* use tables if you want. What harm does it do?

    Have a look at things you can do with CSS & tables:
    http://www.barry.pearson.name/tableaux/

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
     
    Barry Pearson, Jun 21, 2004
    #2
    1. Advertising

  3. Frogleg

    Kris Guest

    In article <>,
    Frogleg <> wrote:

    > I just went to the W3C Validator and it tells me:
    >
    > Line 50, column 75: there is no attribute "BACKGROUND"
    >
    > ..." cellspacing="0" width="100%"
    > background="images/grad4bopaque.gif">
    >
    > (The page is supposed to be HTML 4.01 Transitional.)
    >
    > Could someone please explain this without saying "don't use tables;
    > use CSS"?


    Use CSS on your tables instead of deprecated presentational markup.
    Better of course is to drop *all* presentational markup, but you have
    explained that you are not ready for that yet.

    <table background="foo.jpg" cellpadding="4" ...>

    Would become:

    <table ...>

    With some CSS:

    table {
    color: #000;
    background: url(foo.jpg);
    }

    td {
    padding: 4px;
    }

    --
    Kris
    <> (nl)
     
    Kris, Jun 21, 2004
    #3
  4. Frogleg

    Whitecrest Guest

    In article <>,
    says...
    > I just went to the W3C Validator and it tells me:
    > Line 50, column 75: there is no attribute "BACKGROUND"
    > ..." cellspacing="0" width="100%"
    > background="images/grad4bopaque.gif">
    > Could someone please explain this without saying "don't use tables;
    > use CSS"?


    The two are not mutually exclusive.

    Now re-read what you just asked and tell me if you could answer it
    without making a ton of assumptions.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
     
    Whitecrest, Jun 21, 2004
    #4
  5. Frogleg

    Kris Guest

    In article <LhFBc.454$>,
    "Barry Pearson" <> wrote:

    > Always use CSS. And *also* use tables if you want. What harm does it do?


    Every time you use a table for layout, God kills a kitten.

    --
    Kris
    <> (nl)
     
    Kris, Jun 21, 2004
    #5
  6. Frogleg

    Karl Groves Guest

    "Kris" <> wrote in message
    news:4all.nl...
    > In article <LhFBc.454$>,
    > "Barry Pearson" <> wrote:
    >
    > > Always use CSS. And *also* use tables if you want. What harm does it do?

    >
    > Every time you use a table for layout, God kills a kitten.


    <p style="dog_person">Good!</p>

    -Karl
     
    Karl Groves, Jun 21, 2004
    #6
  7. Kris wrote:
    > In article <LhFBc.454$>,
    > "Barry Pearson" <> wrote:
    >
    >> Always use CSS. And *also* use tables if you want. What harm does it
    >> do?

    >
    > Every time you use a table for layout, God kills a kitten.


    Gosh! Widespread mayhem.

    Toby A Inkster said:
    Top 10 reasons for not using layout tables:
    1. Every time you use a table for layout a puppy dies.

    Thank God I'm an atheist!

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
     
    Barry Pearson, Jun 21, 2004
    #7
  8. Frogleg

    Karl Groves Guest

    "Karl Groves" <> wrote in message
    news:cb75a5$52q$...
    >
    > "Kris" <> wrote in message
    > news:4all.nl...
    > > In article <LhFBc.454$>,
    > > "Barry Pearson" <> wrote:
    > >
    > > > Always use CSS. And *also* use tables if you want. What harm does it

    do?
    > >
    > > Every time you use a table for layout, God kills a kitten.

    >
    > <p style="dog_person">Good!</p>


    good lord. someone smack me.
    I dunno what's worse. writing "style" instead of "class" on such a lame
    joke, or writing this retraction.

    -Karl
     
    Karl Groves, Jun 21, 2004
    #8
  9. Frogleg

    Kris Guest

    In article <yFFBc.468$>,
    "Barry Pearson" <> wrote:

    > > Every time you use a table for layout, God kills a kitten.

    >
    > Gosh! Widespread mayhem.
    >
    > Toby A Inkster said:
    > Top 10 reasons for not using layout tables:
    > 1. Every time you use a table for layout a puppy dies.


    And we're gonna tell you again.. and again.. and again.. and again..

    --
    Kris
    <> (nl)
     
    Kris, Jun 21, 2004
    #9
  10. Kris wrote:
    > In article <yFFBc.468$>,
    > "Barry Pearson" <> wrote:
    >
    >> > Every time you use a table for layout, God kills a kitten.

    >>
    >> Gosh! Widespread mayhem.
    >>
    >> Toby A Inkster said:
    >> Top 10 reasons for not using layout tables:
    >> 1. Every time you use a table for layout a puppy dies.

    >
    > And we're gonna tell you again.. and again.. and again.. and again..


    It'll be sparrows next. I don't see many of those at my bird table
    ..............

    --
    Barry Pearson
    http://www.Barry.Pearson.name/photography/
    http://www.BirdsAndAnimals.info/
    http://www.ChildSupportAnalysis.co.uk/
     
    Barry Pearson, Jun 21, 2004
    #10
  11. Frogleg

    Frogleg Guest

    On Mon, 21 Jun 2004 17:54:33 +0100, "Barry Pearson"
    <> wrote:

    >Frogleg wrote:
    >> I just went to the W3C Validator and it tells me:
    >> Line 50, column 75: there is no attribute "BACKGROUND"
    >> ..." cellspacing="0" width="100%"
    >> background="images/grad4bopaque.gif">
    >> (The page is supposed to be HTML 4.01 Transitional.)

    >
    >It appears that "background" only applies to <body>:
    >http://www.w3.org/TR/html401/index/attributes.html
    >

    It's Homesite's fault. Its little pop-up helper offers one
    'background' for TABLE or TD, and its error checker is fine with it.

    >You can apply a background image to a table using CSS. (You need to get the
    >image path relative to the CSS path, not the document path).


    Yeah. That's what I did, but I wasn't happy about it.

    >Always use CSS. And *also* use tables if you want. What harm does it do?


    Indeed. I beat my brains out for a couple of days trying to do the
    page without tables and then decided I was being stupider than usual,
    and got things lined up in a trice.
    >
    >Have a look at things you can do with CSS & tables:
    >http://www.barry.pearson.name/tableaux/


    Very nice. I just glanced, but will go back.
     
    Frogleg, Jun 21, 2004
    #11
  12. Frogleg

    Frogleg Guest

    In a nutshell, I would like to do this:

    http://home.earthlink.net/~absolutelyfake/dilemma.htm

    with correct HTML/CSS.

    This, even though wrong, shows up the way I want it in IE 6 and
    Mozilla 1.6 -- a background image on the page, and a *different*
    background overlaid for the table.
     
    Frogleg, Jun 22, 2004
    #12
  13. Frogleg

    rf Guest

    "Frogleg" <> wrote in message
    news:...
    > In a nutshell, I would like to do this:
    >
    > http://home.earthlink.net/~absolutelyfake/dilemma.htm
    >
    > with correct HTML/CSS.
    >
    > This, even though wrong, shows up the way I want it in IE 6 and
    > Mozilla 1.6 -- a background image on the page, and a *different*
    > background overlaid for the table.


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <HEAD>
    <style type="text/css">
    body {background-image: url(index_files/mymap.gif)}
    table {background-image: url(index_files/gradred.gif)}
    </style>
    </HEAD>
    <BODY >
    <TABLE width="100%" border=1>
    <TR>
    <TD>
    <H1>A table</H1><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></TD>
    <TD>
    <H1>with two cells</H1>
    </TD>
    </TR>
    </TABLE>
    </BODY>
    </html>


    http://users.bigpond.net.au/rf/frog/
    --
    Cheers
    Richard.
     
    rf, Jun 22, 2004
    #13
  14. Frogleg

    Whitecrest Guest

    In article <>,
    says...
    > In a nutshell, I would like to do this:
    >
    > http://home.earthlink.net/~absolutelyfake/dilemma.htm
    >
    > with correct HTML/CSS.
    >
    > This, even though wrong,


    Why is it wrong?

    > shows up the way I want it in IE 6 and
    > Mozilla 1.6 -- a background image on the page, and a *different*
    > background overlaid for the table.


    CSS can easily do this (as can the tables) look at http://glish.com/css/
    They several examples, one of them is exactly what you are trying to do.
    CSS design is great, but many here use a combination of CSS and Tables.
    Use whish ever is best for the specific issue. Then you are always
    right.
    --
    Whitecrest Entertainment
    www.whitecrestent.com
     
    Whitecrest, Jun 22, 2004
    #14
  15. Frogleg

    PeterMcC Guest

    Barry Pearson wrote in
    <oHIBc.1122$4D4.60@newsfe3-gui>

    > Kris wrote:
    >> In article <yFFBc.468$>,
    >> "Barry Pearson" <> wrote:
    >>
    >>>> Every time you use a table for layout, God kills a kitten.
    >>>
    >>> Gosh! Widespread mayhem.
    >>>
    >>> Toby A Inkster said:
    >>> Top 10 reasons for not using layout tables:
    >>> 1. Every time you use a table for layout a puppy dies.

    >>
    >> And we're gonna tell you again.. and again.. and again.. and again..

    >
    > It'll be sparrows next. I don't see many of those at my bird table


    They'll be back - they're just waiting until all the dogs and kittens have
    been killed.

    BTW, once the kitten's been killed, is it OK to lay it out in a frame on a
    table?

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
     
    PeterMcC, Jun 22, 2004
    #15
  16. Frogleg

    Els Guest

    PeterMcC wrote:

    > Barry Pearson wrote in
    > <oHIBc.1122$4D4.60@newsfe3-gui>
    >
    >> Kris wrote:
    >>> In article
    >>> <yFFBc.468$>,
    >>> "Barry Pearson" <> wrote:
    >>>
    >>>>> Every time you use a table for layout, God kills a
    >>>>> kitten.
    >>>>
    >>>> Gosh! Widespread mayhem.
    >>>>
    >>>> Toby A Inkster said:
    >>>> Top 10 reasons for not using layout tables:
    >>>> 1. Every time you use a table for layout a puppy dies.
    >>>
    >>> And we're gonna tell you again.. and again.. and again..
    >>> and again..

    >>
    >> It'll be sparrows next. I don't see many of those at my
    >> bird table

    >
    > They'll be back - they're just waiting until all the dogs
    > and kittens have been killed.
    >
    > BTW, once the kitten's been killed, is it OK to lay it out
    > in a frame on a table?


    <g>

    --
    Els
    http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
     
    Els, Jun 22, 2004
    #16
  17. Frogleg

    Frogleg Guest

    On Tue, 22 Jun 2004 11:34:35 GMT, "rf" <> wrote:

    >
    >"Frogleg" <>


    >> In a nutshell, I would like to do this:
    >>
    >> http://home.earthlink.net/~absolutelyfake/dilemma.htm
    >>
    >> with correct HTML/CSS.


    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    ><html>
    ><HEAD>
    ><style type="text/css">
    >body {background-image: url(index_files/mymap.gif)}
    >table {background-image: url(index_files/gradred.gif)}

    <etc>

    Thank you. Works like a charm.
     
    Frogleg, Jun 23, 2004
    #17
  18. Frogleg

    Frogleg Guest

    On Tue, 22 Jun 2004 07:39:13 -0400, Whitecrest
    <> wrote:

    >In article <>,
    > says...
    >> In a nutshell, I would like to do this:
    >>
    >> http://home.earthlink.net/~absolutelyfake/dilemma.htm


    >CSS can easily do this (as can the tables) look at http://glish.com/css/
    >They several examples, one of them is exactly what you are trying to do.
    >CSS design is great, but many here use a combination of CSS and Tables.
    >Use whish ever is best for the specific issue. Then you are always
    >right.


    Thanks. I bookmarked glish and found I already had it bookmarked.
    Maybe I should also *look* at it. :)
     
    Frogleg, Jun 23, 2004
    #18
    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. mason66
    Replies:
    0
    Views:
    425
    mason66
    Jul 27, 2006
  2. JWL
    Replies:
    4
    Views:
    591
    Michael Winter
    Sep 26, 2006
  3. jc
    Replies:
    3
    Views:
    1,733
  4. jc
    Replies:
    1
    Views:
    1,371
    Neredbojias
    Mar 19, 2008
  5. Dj Frenzy
    Replies:
    3
    Views:
    312
    Robert
    Feb 10, 2004
Loading...

Share This Page