By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,624 Members | 2,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,624 IT Pros & Developers. It's quick & easy.

There is no attribute "BACKGROUND" & "HEIGHT" + + +

P: n/a
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?

<grumble>Why on Earth do they have to remove the
stuff that ::I:: use to make things nice and tidy?</grumble>

And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?

Well, time to call it an evening anyway........

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com
Jul 20 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
Els
Torbjørn Pettersen wrote:
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?
CSS:

<style type="text/css">
table{
margin-top: 10px;
}
td{
background-image:url(image.gif);
background-repeat:repeat-y;
height:30%;
}
</style>
</head>

http://www.w3.org/TR/REC-CSS2/colors...und-properties
<grumble>Why on Earth do they have to remove the
stuff that ::I:: use to make things nice and tidy?</grumble>
Using CSS (especially in seperate stylesheets) will only
make things tidier and nicer :-)
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?
alt="" if the image really doesn't need a description
(thinking of decorative gifs here)
Well, time to call it an evening anyway........


Same side of the planet as where I am :-)

--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Jul 20 '05 #2

P: n/a
Els
Torbjørn Pettersen wrote:
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?
CSS:

<style type="text/css">
table{
margin-top: 10px;
}
td{
background-image:url(image.gif);
background-repeat:repeat-y;
height:30%;
}
</style>
</head>

http://www.w3.org/TR/REC-CSS2/colors...und-properties
<grumble>Why on Earth do they have to remove the
stuff that ::I:: use to make things nice and tidy?</grumble>
Using CSS (especially in seperate stylesheets) will only
make things tidier and nicer :-)
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?
alt="" if the image really doesn't need a description
(thinking of decorative gifs here)
Well, time to call it an evening anyway........


Same side of the planet as where I am :-)

--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Jul 20 '05 #3

P: n/a
DU
Torbjørn Pettersen wrote:
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.
When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?

<grumble>Why on Earth do they have to remove the
stuff that ::I:: use to make things nice and tidy?</grumble>

Topmargin, marginheight, leftmargin, marginwidth, background were never
part of the HTMl 4 specification and HTML 4 TR was released in 1999.
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?
Yes for text browsers, braille browsers. Remember that some people
disable images to make download faster. MSIE 6, Netscape 7.1, Mozilla
1.x and most browsers allow users to disable download of images.
Anyway, sometimes the download of particular images is not completed or
achieved: editing the alternate text for images is useful.

DU

Well, time to call it an evening anyway........

Jul 20 '05 #4

P: n/a
DU
Torbjørn Pettersen wrote:
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.
When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?

<grumble>Why on Earth do they have to remove the
stuff that ::I:: use to make things nice and tidy?</grumble>

Topmargin, marginheight, leftmargin, marginwidth, background were never
part of the HTMl 4 specification and HTML 4 TR was released in 1999.
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?
Yes for text browsers, braille browsers. Remember that some people
disable images to make download faster. MSIE 6, Netscape 7.1, Mozilla
1.x and most browsers allow users to disable download of images.
Anyway, sometimes the download of particular images is not completed or
achieved: editing the alternate text for images is useful.

DU

Well, time to call it an evening anyway........

Jul 20 '05 #5

P: n/a
DU wrote...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.


This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.


As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)

Torbjørn
Jul 20 '05 #6

P: n/a
DU wrote...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.


This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.


As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)

Torbjørn
Jul 20 '05 #7

P: n/a
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
news:40******@news.broadpark.no...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?


You only need the non-standard BACKGROUND and TOPMARGIN attributes for
ancient, CSS-deprived browsers, e.g. NN4, and accept the validation errors.
Use CSS instead for less antediluvian browsers.



Jul 20 '05 #8

P: n/a
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
news:40******@news.broadpark.no...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.

When validating it, I get this error:
there is no attribute "BACKGROUND"

The validators also tell me there are no "HEIGHT" or
"TOPMARGIN" attributes. Where did they go? And
what to use now?


You only need the non-standard BACKGROUND and TOPMARGIN attributes for
ancient, CSS-deprived browsers, e.g. NN4, and accept the validation errors.
Use CSS instead for less antediluvian browsers.



Jul 20 '05 #9

P: n/a
DU
Torbjørn Pettersen wrote:
DU wrote...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.


This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.

As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)

Torbjørn


Your page suffers from many design and coding problems.

I recommend that you avoid table design, specially nested tables. You
should also avoid <font> and center attributes since using CSS will
achieve a better job (code reusability, site maintenance).

You should start with a doctype declaration which will trigger standards
compliance rendering mode in MSIE 6 so that its implementation of the
CSS1 box model will be correct and will render like NS 7.x, Opera 7.x
and other standards compliant browsers.

More to read here:

Why tables for layout is stupid:
problems defined, solutions offered
http://www.hotdesign.com/seybold/

Tableless layout HOWTO
http://www.w3.org/2002/03/csslayout-howto

W3C Quality Assurance:
Tips for webmasters
http://www.w3.org/QA/Tips/

W3C Quality Assurance:
Recommended Practices
Forget <font>, use CSS
http://www.w3.org/QA/Tips/font-size

If you want to center a block-level element, then use:
margin-left: auto; margin-right:auto;
to center the element within its immediate parent.

If you want to center inline elements, then use:
text-align: center;
to center text, images within a block-level element.

This is useful to know as you use 45 center attributes or elements and
those are deprecated.

List of valid DTDs you can use in your document:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

Activating the Right Layout Mode Using the Doctype Declaration
http://www.hut.fi/u/hsivonen/doctype.html

I recommend you use HTMl 4.01 strict for the reasons I gave about MSIE 6
box model.

DU
Jul 20 '05 #10

P: n/a
DU
Torbjørn Pettersen wrote:
DU wrote...
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells, thus making I look like one
high image in there.


This is too specific and complex here. There is no way someone could
actually understand the specificity of your web page. An url is best here.

As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)

Torbjørn


Your page suffers from many design and coding problems.

I recommend that you avoid table design, specially nested tables. You
should also avoid <font> and center attributes since using CSS will
achieve a better job (code reusability, site maintenance).

You should start with a doctype declaration which will trigger standards
compliance rendering mode in MSIE 6 so that its implementation of the
CSS1 box model will be correct and will render like NS 7.x, Opera 7.x
and other standards compliant browsers.

More to read here:

Why tables for layout is stupid:
problems defined, solutions offered
http://www.hotdesign.com/seybold/

Tableless layout HOWTO
http://www.w3.org/2002/03/csslayout-howto

W3C Quality Assurance:
Tips for webmasters
http://www.w3.org/QA/Tips/

W3C Quality Assurance:
Recommended Practices
Forget <font>, use CSS
http://www.w3.org/QA/Tips/font-size

If you want to center a block-level element, then use:
margin-left: auto; margin-right:auto;
to center the element within its immediate parent.

If you want to center inline elements, then use:
text-align: center;
to center text, images within a block-level element.

This is useful to know as you use 45 center attributes or elements and
those are deprecated.

List of valid DTDs you can use in your document:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

Activating the Right Layout Mode Using the Doctype Declaration
http://www.hut.fi/u/hsivonen/doctype.html

I recommend you use HTMl 4.01 strict for the reasons I gave about MSIE 6
box model.

DU
Jul 20 '05 #11

P: n/a
On Thu, 15 Apr 2004, DU wrote:
Topmargin, marginheight, leftmargin, marginwidth, background were never
part of the HTMl 4 specification and HTML 4 TR was released in 1999.


HTML4 TR was complete in 1997. The 4.01 version, which I doubt has
any significant impact on the issues raised here, is the one that was
final in 1999.

Not much seems to have happened in the intervening 6-7 years. A few
specialists are now writing HTML4 "per se" - and more power to their
elbows, say I - while the vast majority are still writing something
that's in effect pseudo-HTML DTP a la Mosaic Communications
Corporation and HTML/3.2 - except that some misguided souls have
compounded the offence by translating their HTML/3.2 presentational
attributes into more-verbose quasi-CSS "style=" attributes, while
carefully missing the point of the separation of content and style.

Have I had a bad day? Yes, I have. But the facts are the same, no
matter.
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?


Yes for text browsers, braille browsers.


The alt attribute is mandatory for HTML. It's not limited to specific
browsers. And remember, not all HTML client agents are browsers.

Good luck
Jul 20 '05 #12

P: n/a
On Thu, 15 Apr 2004, DU wrote:
Topmargin, marginheight, leftmargin, marginwidth, background were never
part of the HTMl 4 specification and HTML 4 TR was released in 1999.


HTML4 TR was complete in 1997. The 4.01 version, which I doubt has
any significant impact on the issues raised here, is the one that was
final in 1999.

Not much seems to have happened in the intervening 6-7 years. A few
specialists are now writing HTML4 "per se" - and more power to their
elbows, say I - while the vast majority are still writing something
that's in effect pseudo-HTML DTP a la Mosaic Communications
Corporation and HTML/3.2 - except that some misguided souls have
compounded the offence by translating their HTML/3.2 presentational
attributes into more-verbose quasi-CSS "style=" attributes, while
carefully missing the point of the separation of content and style.

Have I had a bad day? Yes, I have. But the facts are the same, no
matter.
And then there is the "ALT" attribute.... Do I really have
to use that on ::all:: my images?


Yes for text browsers, braille browsers.


The alt attribute is mandatory for HTML. It's not limited to specific
browsers. And remember, not all HTML client agents are browsers.

Good luck
Jul 20 '05 #13

P: n/a
DU wrote...
Torbjørn Pettersen wrote:
As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)


Your page suffers from many design and coding problems.


Try to read the last sentence in my post once more. ;-) Then you'll see
that the first web site you're pointing to "Why tables for layout is stupid:
problems defined, solutions offered" actually explains why tables are the
way to do things when you want to do what I want to do:
http://www.hotdesign.com/seybold/23snags.html

But, there are are a lot of usefull information on the pages you point to,
but it did not answer my question. Thanks.

Torbjørn
Jul 20 '05 #14

P: n/a
DU wrote...
Torbjørn Pettersen wrote:
As an example you can check out www.fantafiction.com/default.asp
Look for the "sideruner.gif" image. When you look at the code you'll
also understand why I'm rebuilding it. ;-)


Your page suffers from many design and coding problems.


Try to read the last sentence in my post once more. ;-) Then you'll see
that the first web site you're pointing to "Why tables for layout is stupid:
problems defined, solutions offered" actually explains why tables are the
way to do things when you want to do what I want to do:
http://www.hotdesign.com/seybold/23snags.html

But, there are are a lot of usefull information on the pages you point to,
but it did not answer my question. Thanks.

Torbjørn
Jul 20 '05 #15

P: n/a
Torbjørn Pettersen wrote:

the first web site you're pointing to "Why tables for layout is stupid:
problems defined, solutions offered" actually explains why tables are the
way to do things when you want to do what I want to do:
http://www.hotdesign.com/seybold/23snags.html
That page explains how to get a nav bar of one color to extend down the
entire height of a page, next to content with a different background
color. I've done that on a restaurant web site. Perhaps it will give you
some ideas.

http://www.tsmchughs.com/

If you have questions about what I've done, ask here.

You started this thread talking about background images in tables.
Background images are merely one solution to the nav problem described
on the hotdesign.com page. Perhaps we have the old x-y problem.
there are are a lot of usefull information on the pages you point to,
but it did not answer my question.


Two possible answers. The flip answer is, "Welcome to usenet." :-)

The not flip answer is that perhaps you should think about a solution to
the larger issue, instead of "how do I get this bid of code to do what I
want?"

http://www.catb.org/~esr/faqs/smart-questions.html#goal

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #16

P: n/a
Torbjørn Pettersen wrote:

the first web site you're pointing to "Why tables for layout is stupid:
problems defined, solutions offered" actually explains why tables are the
way to do things when you want to do what I want to do:
http://www.hotdesign.com/seybold/23snags.html
That page explains how to get a nav bar of one color to extend down the
entire height of a page, next to content with a different background
color. I've done that on a restaurant web site. Perhaps it will give you
some ideas.

http://www.tsmchughs.com/

If you have questions about what I've done, ask here.

You started this thread talking about background images in tables.
Background images are merely one solution to the nav problem described
on the hotdesign.com page. Perhaps we have the old x-y problem.
there are are a lot of usefull information on the pages you point to,
but it did not answer my question.


Two possible answers. The flip answer is, "Welcome to usenet." :-)

The not flip answer is that perhaps you should think about a solution to
the larger issue, instead of "how do I get this bid of code to do what I
want?"

http://www.catb.org/~esr/faqs/smart-questions.html#goal

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #17

P: n/a
Brian wrote...
You started this thread talking about background images in tables.
Background images are merely one solution to the nav problem described
on the hotdesign.com page. Perhaps we have the old x-y problem.


I think I phrased it bad, English is not my mother language, so sometimes
I'm a bit unclear when trying to explain things. :-)

In the end it looks like I'm ditching the whole layout I had in mind, and
will go for something much simpler.

Torbjørn
Jul 20 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.