Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 software programmers and website developers 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 developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 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
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.

Reply With Quote
  #2 (permalink)  
Old June 14th, 2007, 08:18 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
  #3 (permalink)  
Old 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
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.

Reply With Quote
  #4 (permalink)  
Old June 19th, 2007, 09:29 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:37 AM.


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