HighDots Forums  

Table. What options do I have?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Table. What options do I have? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shapper
 
Posts: n/a

Default Table. What options do I have? - 11-09-2007 , 08:07 PM






Hello,

I work with ASP.NET and I never liked the way some controls are
rendered.
Fortunately .NET 3.5 has a new control, ListView, which lets me render
my HTML code the way I want.

I need do display tabular data on various pages of a web site.

Should I use tables? Should I use lists? What other option is best and
which should I use?
And if I use a table what is the cleaner and better table code I
should have?

For example, should I consider this a good code:

<div class="PrettyGridView" id="GridView1">
<div class="AspNet-GridView">
<div class="AspNet-GridView-Pagination AspNet-GridView-Top">
<a href="javascript:__doPostBack('GridView1','Page$1' )">1</a>
<a href="javascript:__doPostBack('GridView1','Page$2' )">2</a>
<span>3</span>
</div>
<table cellpadding="0" cellspacing="0" summary="">
<thead>
<tr>
<th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort
$Operation')">Operation</a></th>
<th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Re ps')">Repetitions</
a></th>
<th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Du ration')">Total
test</a></th>
<th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Av erage')">Average</
a></th>
</tr>
</thead>
<tbody>
<tr>
<td>Sin</td>
<td>27124</td>
<td>31</td>
<td>1.1521</td>
</tr>
<tr class="AspNet-GridView-Alternate">
<td>Sinh</td>
<td>19777</td>
<td>31</td>
<td>1.5801</td>
</tr>
</tbody>
</table>
<div class="AspNet-GridView-Pagination AspNet-GridView-Bottom">
<a href="javascript:__doPostBack('GridView1','Page$1' )">1</a>
<a href="javascript:__doPostBack('GridView1','Page$2' )">2</a>
<span>3</span>
</div>
</div>
</div>

Thanks,
Miguel


Reply With Quote
  #2  
Old   
Rob Waaijenberg
 
Posts: n/a

Default Re: Table. What options do I have? - 11-10-2007 , 02:00 AM






shapper schreef:
Quote:
Hello,

I work with ASP.NET and I never liked the way some controls are
rendered.
Fortunately .NET 3.5 has a new control, ListView, which lets me render
my HTML code the way I want.
I don't know anything about ASP.NET or .NET
so I cannot tell you about their controls.

Quote:
I need do display tabular data on various pages of a web site.

Should I use tables? Should I use lists? What other option is best and
which should I use?
If the data is really tabular,
then a table would be your best choice.
If you have something in mind that resembles a table with just one
column, then a list might be another good choice.



Quote:
And if I use a table what is the cleaner and better table code I
should have?

We couldn't possibly tell, if we don't know what's going to be in the table.


Quote:
For example, should I consider this a good code:
I doubt if anybody could have a serious opinion about this
without knowing more of the data involved, the goals of the page, the
kind of users, etc.

We have no idea about the underlying CSS. We have no clue what
"PrettyGridView" is about. Or "GridView1".
We have no idea about the javascript involved. What does it do?


Quote:
div class="PrettyGridView" id="GridView1"
div class="AspNet-GridView"
div class="AspNet-GridView-Pagination AspNet-GridView-Top"
a href="javascript:__doPostBack('GridView1','Page$1' )">1</a
a href="javascript:__doPostBack('GridView1','Page$2' )">2</a
span>3</span
/div
table cellpadding="0" cellspacing="0" summary=""
thead
tr
th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort
$Operation')">Operation</a></th
th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Re ps')">Repetitions</
a></th
th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Du ration')">Total
test</a></th
th scope="col"><a
href="javascript:__doPostBack('GridView1','Sort$Av erage')">Average</
a></th
/tr
/thead
tbody
tr
td>Sin</td
td>27124</td
td>31</td
td>1.1521</td
/tr
tr class="AspNet-GridView-Alternate"
td>Sinh</td
td>19777</td
td>31</td
td>1.5801</td
/tr
/tbody
/table
div class="AspNet-GridView-Pagination AspNet-GridView-Bottom"
a href="javascript:__doPostBack('GridView1','Page$1' )">1</a
a href="javascript:__doPostBack('GridView1','Page$2' )">2</a
span>3</span
/div
/div
/div

Thanks,
Miguel


Some of us could problably help you
if you give us a link to a try-out page. Give us a URL.
If we get a view of the table and the data it displays we can give some
advice on the CSS.


--
Rob


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.