easy code doesn't work...

A

Andre

hello!

can anyone tell me why such easy part of code doesn't work?

<table cellspacing="2" cellpadding="2" border="0>
<tr>
<td width="733" height="83" bgcolor="black">
</td>
</tr>

<tr>
<td background="gif_3.gif" width="733" height="33">
</td>
</tr>
<tr>
<td width="733" height"90" bgcolor="red">
</td>
</tr>

</table>


regards
Andre
 
B

Bob Long

In
Andre said:
hello!

can anyone tell me why such easy part of code doesn't work?

<table cellspacing="2" cellpadding="2" border="0>

Missing quote... border="0">
<tr>
<td width="733" height="83" bgcolor="black">
</td>
</tr>

<tr>
<td background="gif_3.gif" width="733" height="33">

background is not valid for td.
</td>
</tr>
<tr>
<td width="733" height"90" bgcolor="red">

Missing "="... height="90"

Bob Long
 
S

Steve Pugh

Andre said:
it is valid for background...


Huh?

<body background=".."> is valid.

<td background=".."> is not

These you can check with the HTML specification or via a validator.
Some browsers may support the latter but that doesn't stop it being
invalid, nor does it stop the CSS equivelent being far preferable.

<background background=".."> which you seem to be implying above is
just made up rubbish.

Steve
 
A

Andre

[cut]


it means that if I can see <td background="..."> in the Internet Explorer
it's not obligatory to see the same in Netscape for example?


regards
Andre
 
S

Steve Pugh

Andre said:

Thus making it impossible to know what you're replying to.
it means that if I can see <td background="..."> in the Internet Explorer
it's not obligatory to see the same in Netscape for example?

No. As it's invalid code no browser is under any obligation to
anything with it at all.

The answer you're looking for, but not the one you need to have, is
that Netscape does not render backgrounds on empty cells.

Steve
 
V

Vincent

Andre said:
it means that if I can see <td background="..."> in the Internet Explorer
it's not obligatory to see the same in Netscape for example?
An attribute is valid for a given element if it appears in the HTML
specification (http://www.w3.org/TR/html4/), not if it seems to work in
a given browser.
As you can see, no background attribute for TD. Actually, you'll notice
that this is deprecated even for BODY: you should use CSS to specify a
background for an element.
 
T

Toby A Inkster

Andre said:
it means that if I can see <td background="..."> in the Internet Explorer
it's not obligatory to see the same in Netscape for example?

Yes. In short <td background="..."> might work, or it might not. Arguably,
it *shouldn't* work.

OTOH, this should work in any CSS-capable browser:

<td style="background-image: url('...');">

Note, whenever you set a background image, you should also set a
background colour for those with images disabled.
 
A

Andre

OTOH, this should work in any CSS-capable browser:
<td style="background-image: url('...');">

I didn't even start earning CSS because I'm afraid of it :)
it looks a litle bit more difficult then clean HTML...
please tell me if it is a part of CSS what you have written here?


Note, whenever you set a background image, you should also set a
background colour for those with images disabled.

but without images set as a bgd it looks terrible :( I have to do sth to
make it clear and readable for all kind of browsers...


regards
Andre
 
L

Leif K-Brooks

Andre wrote:

I didn't even start earning CSS because I'm afraid of it :)
it looks a litle bit more difficult then clean HTML...

Yes, it is. Your HTML is most definitley not clean.
 
M

Mark Parnell

Sometime around Wed, 22 Oct 2003 10:52:31 +0200, Sid Ismail is reported to
have stated:
Once you take the step, it becomes fun! Like swimming.

I hate swimming. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top