|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
XHTML 1.0I'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 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... -- Show quoteHide quotePatrice "Simon" <simon.zu***@studio-moderna.com> a écrit dans le message de news:%23pXkSOO8FHA.2816@tk2msftngp13.phx.gbl... > 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 > > Thank you Patrice.
1. Why should I use styles? It's more work for the same in some cases. 2. I have one very complicated page with 1000 tables where I exploit the height attribute of the table. And it works and the users are satisfacted. But the height attribute doesn't work any more if I use new reccomendations. See my post: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/tree/browse_frm/thread/d248213b9f631804/a603bba2b2817695?rnum=1&hl=sl&q=simon+zupan+microsoft.public.dotnet.framework&_done=%2Fgroup%2Fmicrosoft.public.dotnet.framework.aspnet%2Fbrowse_frm%2Fthread%2Fd248213b9f631804%2F32a82a0f00ec8fbb%3Flnk%3Dst%26q%3Dsimon+zupan+microsoft.public.dotnet.framework%26rnum%3D7%26hl%3Dsl%26#doc_32a82a0f00ec8fbb Any suggestions? Regards from Slovenia, Simon Show quoteHide quote "Patrice" <nob***@nowhere.com> wrote in message news:uNAPQRO8FHA.3880@TK2MSFTNGP12.phx.gbl... > 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... > > > -- > Patrice > > "Simon" <simon.zu***@studio-moderna.com> a écrit dans le message de > news:%23pXkSOO8FHA.2816@tk2msftngp13.phx.gbl... >> 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 >> >> > > 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... -- Show quoteHide quote"Simon" <simon.zu***@studio-moderna.com> a écrit dans le message de http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/tree/browse_frm/thread/d248213b9f631804/a603bba2b2817695?rnum=1&hl=sl&q=simon+zupan+microsoft.public.dotnet.framework&_done=%2Fgroup%2Fmicrosoft.public.dotnet.framework.aspnet%2Fbrowse_frm%2Fthread%2Fd248213b9f631804%2F32a82a0f00ec8fbb%3Flnk%3Dst%26q%3Dsimon+zupan+microsoft.public.dotnet.framework%26rnum%3D7%26hl%3Dsl%26#doc_32a82a0f00ec8fbbnews:OKFQrYO8FHA.1000@tk2msftngp13.phx.gbl... > Thank you Patrice. > > 1. Why should I use styles? It's more work for the same in some cases. > > 2. I have one very complicated page with 1000 tables where I exploit the > height attribute of the table. > And it works and the users are satisfacted. > > But the height attribute doesn't work any more if I use new reccomendations. > > See my post: > > Show quoteHide quote > > Any suggestions? > > Regards from Slovenia, > Simon > > "Patrice" <nob***@nowhere.com> wrote in message > news:uNAPQRO8FHA.3880@TK2MSFTNGP12.phx.gbl... > > 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... > > > > > > -- > > Patrice > > > > "Simon" <simon.zu***@studio-moderna.com> a écrit dans le message de > > news:%23pXkSOO8FHA.2816@tk2msftngp13.phx.gbl... > >> 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 > >> > >> > > > > > > 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 Simon wrote: Show quoteHide quote > 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 > > 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 Show quoteHide quote "Simon" wrote: > 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 > > >
Other interesting topics
Using Components in ASP.NET (C#)
The system cannot find the file specified. (Exception from HRESULT: 0x80070002) Can't edit, delete or add row in an Access database in a website 2 GredView {0:d} formatting doesn't work Event 1089 .ascx file as index page? Adding CssClass on .ascx page How to add Label control to DataList? Dynamically Loading the User Control and Passing Parameters to it. References VS Imports |
|||||||||||||||||||||||