Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets 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:46 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

     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 July 19th, 2007, 01:34 PM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Hi! :) The display property in CSS only declares a data type. It's like declaring that your variable is an integer. And while it's necessary because you've defined your own XML tags, you haven't affected the appearance beyond establishing basic table structure. If you want to define the borders you need to use the border property.

TABLE {
display:table;
border: 2px solid #000000;
}

There's also a text-align property that you can set to left, right, and center. It is not well-behaved though, but the borders should work fine.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
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 ASP.NET 2.0 Basics 3 June 19th, 2007 09:29 AM
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 07:10 PM.


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