473,466 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
17 7226
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
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
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
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
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
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
"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
"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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ghyslaine Crespe | last post by:
Hello, In my script, the line document.getElementById(id).style.background-position = "-200px -500px"; fails ! So, how can I change the background-position value ?
6
by: Sandman | last post by:
I'm having some problem here... I have a javascript I've downloaded that goes through all PNG files and enables the transparency channel in them for IE5.5+ by converting them to SPAN layers with...
2
by: kigerm | last post by:
Hey guys, Here is my problem. I have a page consisting of a table with one row and 2 cells. Inside the first cell is a table that serves as a table of contents. That table has several rows with...
7
by: raylaur | last post by:
I'm using a javascript "slide" function to move a <div> layer in 10 pixel increments from one location on a page to another. The layer contains a GIF image. It's basically a side panel that flies out...
15
by: pbd22 | last post by:
Hi. I want to create a tab with a little "active tab" arrow below it to tell the user where they are. An example is here: http://personals.yahoo.com/us/search/dashboard Does anybody know of...
1
by: Miggiddy79 | last post by:
Does any body know how to fix this. I am trying to validate these html codes through the markup validation. I have 5 error messages: 1) Line 114, Column 15: there is no attribute "BACKGROUND" ....
1
by: zaidalin79 | last post by:
I am in a JavaScript class, and we have to get all of our code to validate at the w3c website... Here is my code, it does what I want it to do which is require the user to enter the name and either...
2
by: bips2008 | last post by:
The code seems to work fine in other browser but in IE it throws this error. This is very urgent for me and any help would be greatly appreciated For your convienence i have posted the code for the...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.