html >> Table background image

by fridakahlous » Sat, 21 Jan 2006 06:08:12 GMT

Validation Results - I keep getting the massage "The tag: "table" doesn't have an attribute: "background" in currently active versions.[XHTML.1.0. transitional]:confused;


html >> Table background image

by Dan Rumney » Sat, 21 Jan 2006 19:13:57 GMT


A definitive answer would require a link to the file that you validated,
but going from the error, I would guess that you've got some code along
the lines of:

...
<table background="..." ...>
etc

As it says in the error, the Table tag does not have the attribute
"background" in the doctype version that your are validating against.

Put another way, "background" is not a valid attribute for tables:

http://www.w3.org/TR/html401/index/attributes.html
http://www.w3.org/TR/html401/struct/tables.html #edef-TABLE

Dan



html >> Table background image

by Murray *TMM* » Sat, 21 Jan 2006 21:23:11 GMT

The message is correct. XHTML1.0 Transitional doesn't have a background
attribute for the <table> tag. Just do it in CSS....
(shown inline)

<table style="background-image:url(whatever.gif)"

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs , Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================








Table background image

by fridakahlous » Sun, 22 Jan 2006 08:44:01 GMT

See below its what I got, your way is not working. Thank for the help.

<body>
<div align="center">
<table width="200" border="0" background="../image/Sub2BG.jpg">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
:confused;



Table background image

by Murray *TMM* » Sun, 22 Jan 2006 20:39:42 GMT

<table width="200" border="0"
style="background-image:url(../image/Sub2BG.jpg);">

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs , Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================








Table background image

by Dan Rumney » Sun, 22 Jan 2006 20:43:08 GMT

Again... post a URL... your code snippet cannot be validated without
extra work on our part... And "your way is not working" is too vague to
be helpful...

Your snippet, made parseable:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<title>Test</title>
</head>
<body>
<div align="center">
<table width="200" border="0" background="../image/Sub2BG.jpg">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
</html>

... doesn't validate due to the invalid use of "background" in the table
tag.

Code as suggested by Murray:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns=" http://www.w3.org/1999/xhtml ">
<head>
<title>Test</title>
</head>
<body>
<div align="center">
<table width="200" border="0"
style="background-image:url(../image/Sub2BG.jpg)">
<tr>
<td> </td>
</tr>
</table>
</div>
</body>
</html>

...does validate

Does that help?

Dan


Table background image

by fridakahlous » Fri, 27 Jan 2006 22:10:11 GMT

Sorry, I still need help, I open a new css page and pasted, <table width="200"
border="0" style="background-image:url(../image/Sub8BG.jpg);">, then i open a
template page, selected a table and look for a way to import the css, the only
selection was class, it did not work. NOT SURE WHAT I'M DOING. Please HELP



Table background image

by fridakahlous » Fri, 27 Jan 2006 22:11:04 GMT

Sorry, I still need help, I open a new css page and pasted, <table width="200"
border="0" style="background-image:url(../image/Sub8BG.jpg);">, then i open a
template page, selected a table and look for a way to import the css, the only
selection was class, it did not work. NOT SURE WHAT I'M DOING. Please
HELP:confused;



Table background image

by Murray *TMM* » Fri, 27 Jan 2006 22:47:19 GMT

Are you pasting HTML into a CSS page?

The CSS page should look like this -

table { background-image:url(../image/Sub8BG.jpg); }

That's all that should be there.

Then open your HTML page, and your table should look like this -

<table width="200" border="0">

Now use the CSS panel to link the page to the CSS file. When you do that,
you should see the background image appear (assuming the path is correct),
since the CSS rule will apply to ALL tables on the page.

However if this is not what you want, then you could do the other thing it
looks like you are trying to do in your post below. Just change your HTML
page's table tag from what I show above, to this -

<table width="200" border="0"
style="background-image:url(../image/Sub8BG.jpg);">

In other words, just use inline CSS to style that particular table. You
would not need to do anything further.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs , Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================








Similar Threads

1. Resizing a Table Background Image

2. Can I preload a table background image

Hi

 I'm using a large image (50KB) as a table background. With slower modems it  
loads after the text and looks tatt.
 If I apply a preload behaviour such as
 onLoad="MM_preloadImages('images/Background.jpg')
 in the body tag will this work and will it be cross browser compatible?.

 Or is there a method by which I can preload the contents of the entire page so 
they display as one?.

 Any help much apreciated.

 Mike

3. CS4 Table Background Images - Adobe Dreamweaver

4. fixed table background image?

Is there a way to create a fixed background image in a table or a table cell 
through CSS?  that is, the text would scroll but the image would stay in the 
same place.  Ive been able to do it with a Body background image but not with a 
table Bg image.

 this code doesnt seem to work.  thanks for your help.

 <style>
 .tableBackground {
 	background-attachment: fixed;
 	background-image: url(images/global/contentBackground.jpg);
 	background-repeat: no-repeat;
 }
 -->
 </style>

 <table width="500" border="0" cellpadding="0" cellspacing="0" 
class="tableBackground">

5. inserting table background image - Adobe Dreamweaver

6. Layout table background image?

I have a nest of layout tables(one inside another)...and was wondering if its possible to use an image for the background of the inner layout table?  

cheers in advance.

7. Need table background image to resize - Adobe Dreamweaver

8. No repeat of table background image?

Is it possible to have a table background image that doesnt repeat?

Hmm i thought you could do this somehow?

??