Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 14th, 2007, 10:00 AM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default CSS for XML in ASP.NET

     If there is a more appropriate forum for this question please let me know.
     I have a XML file that displays info including tables but the tables are not formatting correctly. This is the only thing I have in my CSS that references tables:
                      TABLE { display:table }
                      ROW { display:table-row }
                      CELL { display:table-cell }


          Here is an example of one of my tables:

                           <TABLE>
<CAPTION>
<TableTitle>
<A ID="pgfId-1026394"></A>
<A ID="75579"></A>
CAB LIGHT Switch Logic</TableTitle>
</CAPTION>
<ROW>
<TH ROWSPAN="1" COLSPAN="1">
<Body-Bold-Center>
<A ID="pgfId-1026400"></A>
Switch Position</Body-Bold-Center>
</TH>
<TH ROWSPAN="1" COLSPAN="1">
<Body-Bold-Center>
<A ID="pgfId-1026402"></A>
Incandescent</Body-Bold-Center>
</TH>
<TH ROWSPAN="1" COLSPAN="1">
<Body-Bold-Center>
<A ID="pgfId-1026404"></A>
Fluorescent</Body-Bold-Center>
</TH>
</ROW>
<ROW>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026406"></A>
OFF</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026408"></A>
Off</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026410"></A>
Off</Body>
</CELL>
</ROW>
<ROW>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026412"></A>
READING</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026414"></A>
On</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026416"></A>
Off</Body>
</CELL>
</ROW>
<ROW>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026418"></A>
BOTH</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026420"></A>
On</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026422"></A>
On</Body>
</CELL>
</ROW>
<ROW>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026424"></A>
CEILING</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026426"></A>
Off</Body>
</CELL>
<CELL ROWSPAN="1" COLSPAN="1">
<Body>
<A ID="pgfId-1026428"></A>
On</Body>
</CELL>
</ROW>
</TABLE>

    The table has 3 columns, a header row and 4 data rows. When I run the xml the table comes up with no borders at all, the header titles in the center of the screen and the data columns aligned with the left side of the screen. Any thoughts at all? Thanks and regards.

 
Old June 14th, 2007, 08:18 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

When you say "run the xml" what do you mean? Where are you "running" it? Are you viewing it in a browser? I'm a little confused that you have what appears to be XML (though looks like HTML) along with CSS. I suspect that you are trying to view this in the browser, but the browser doesn't know anything the non-html tags.

Please explain further how you are viewing the out of the HTML.

-Peter
 
Old June 19th, 2007, 06:17 AM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default

I am trying to bring up the table in asp.net in a browser, that's what I meant by "running it". And the code I have in my ASP.NET webform is the tagged code above.

 
Old June 19th, 2007, 09:29 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

<ROW> and <CELL> are not valid HTML tags. You need to convert those to <tr> and <td>. I'm fairly sure that <CAPTION> isn't valid HTML either.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 Advanced CSS Question aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 April 28th, 2008 03:58 AM
CSS anomolies in ASP.NET David_0223 ASP.NET 2.0 Basics 1 March 27th, 2008 03:06 PM
CSS for XML in ASP.NET toddw607 CSS Cascading Style Sheets 1 July 19th, 2007 01:34 PM
CSS and ASP.net conflict joecoleman ASP.NET 2.0 Basics 2 June 1st, 2006 07:55 AM
Styles.CSS in ASP.NET rajen CSS Cascading Style Sheets 2 July 22nd, 2005 04:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.