|
|
 |
| 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 tens of thousands of computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other programmers’ questions, win occasional prizes given to our best members, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

June 14th, 2007, 10:00 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Location: Binghamton, NY, USA.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 14th, 2007, 08:18 PM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
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
|

June 19th, 2007, 06:17 AM
|
|
Authorized User
|
|
Join Date: Feb 2007
Location: Binghamton, NY, USA.
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 19th, 2007, 09:29 AM
|
 |
Friend of Wrox
Points: 16,368, Level: 55 |
|
|
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,394
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
<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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |