XHTML 1.0

S

Simon

I'm using visual studio 2005.

I have table:

<table><tr><td width=30%></td><td width=70%></td></tr></table>


and I get an error message:

Validation (XHTML 1.0 Transitional): Attribute 'width' is considered
outdated. A newer construct is recommended.

How should I do?

How can I get rid off this xhtml validation?

Thanks,Simon
 
P

Patrice

Either change the validation schema you are using (tools options AFAIK).

If you want still to target XHTML, use styles instead of obsoleted HTML
attributes. Googling for "cascading style sheets" should allow to find
materials about this...
 
P

Patrice

Have a look at http://w3.org to see the various flavor of HTML/XHTML
standards...
The current trend is to separate content and appearence. You are anyway free
anyway to target an old standard if you prefer...

You can apply the same styles to multiple tables either by suing the
classname of even by suign inline styles etc...

I never saw a layout with so much table. There is perhaps an easier way of
doing this...



--
 
M

Mats Lycken

If your tables only have 2 cells in them, can't you use another tag to
do it?

Something like:

<div class="tbl">
<p class="left"></p>
<p class="right"></p>
</div>

where your css styles looks something like

div.tbl
{
height: 1cm; /* the height of your table */
}
p.left
{
width: 30%;
float: left;
}
p.right
{
width: 70%;
float: right;
}

I think it's really recommended to write according to new standards
since old ones aren't guaranteed to work in the future.
And using tables just because the layout "works" I'm not that fond of...

Best regards,
Mats Lycken
 
G

Guest

Hi Simon,

The guys are right, you should switch to CSS styles for future projects, but
for a quick solution check out this doc from w3..

http://www.w3.org/TR/xhtml1/

I suspect your problem is that *all* attributes need to have quotes, so..

<table width="20%"> etc. You should be able to do a find replace to fix this.

Cheers


Dan
 

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
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top