473,394 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Doing a table in CSS

--
I am just beginning to get into CSS. I like to keep all
my html simple and generic looking.

I want to use a table, because I have, (gasp) tabular
data. I want it to look like a table. Not only that,
but I want it to look like a plain ordinary
uncomplicated vanilla table, to look like everyone
else's table.

Seems to me that the only reasonably easy way to do this
is to declare the style transitional, and use <TABLE >

Is there a better way?

--digsig
James A. Donald
6YeGpsZR+nOTh/cGwvITnSR3TdzclVpR0+pr3YYQdkG
I+ZMSazMMSKlfyX+QwvlSFcNl49Fafn5glRFYcFV
4SY3/GBXA3FTNgCjcJdokwMMCbs5dlavAIpG3504w
--
http://www.jim.com
Jul 21 '05 #1
14 4157
James A. Donald wrote:
--
I am just beginning to get into CSS. I like to keep all
my html simple and generic looking.

I want to use a table, because I have, (gasp) tabular
data. I want it to look like a table. Not only that,
but I want it to look like a plain ordinary
uncomplicated vanilla table, to look like everyone
else's table.

Seems to me that the only reasonably easy way to do this
is to declare the style transitional, and use <TABLE >

Is there a better way?

--digsig


Since you have tabular data, I'd go with a table, that's what they're for.

============================

http://www.allmyfaqs.com/faq.pl?Tableless_layouts

CSS-Based Layouts

HTML was never designed to be a layout language. The <table> element was
designed to mark-up tabular data (such as you'd find in a spreadsheet).
CSS (Cascading Style Sheets) was designed for design and presentational
issues - and makes pages easier and faster to code, more manageable,
accessible, and faster to download.

Do not let the term "tableless layouts" fool you, it means exactly what
it says, it does not mean "tableless webpages". You should continue to
use tables for tabular data.

============================

http://webdesign.about.com/od/css/a/aa102102a.htm

....CSS Positioning (CSS-P) is the only way to create standards based Web
pages using XHTML. Why? Because XHTML requires that tables only be used
to define tabular data, and not be used for layout.

============================

http://www.tableless.com.br/en/

What is Tableless?

Tableless isn't a technology, nor a programming language, much less an
application! Tableless is a rather misleading name for a method of
building clean, accessible and standard complaint websites.
Notwithstanding, "tableless" is what best describes the main concept
towards a more accessible web: the abolishing of tables as a means of
designing web sites.

We use CSS to format the information contained in the text markup files
or, if you prefer, (X)HTML files.

Clarifying: We don't use the infamous tables to structure the website.
For this we use exclusively CSS. We didn't get rid of the tables. In the
tableless method, all the tags are used semantially, i.e, each tag has
its own role. If you want to have an italic text, you should use the
<i></i> tag. Want a paragraph? Use <p></p> Got it? So, if you want to
display tabular data , e.g. a list of products with their prices, names,
if it's available in the stock; you should use tables. Therefore, using
tables to display tabular data is right but never use them to layout
structuring.

============================

http://www.dcddesigns.com/folder/web...esign-Services

Tableless CSS Driven "Fluid" Website Design

So you may be asking "what are tables and why does removing them from my
website help?" Glad you asked! Tables have mistakenly been used for many
years by designers to piece a site's graphic layout back together,
similar to a jigsaw puzzle.

.... Removing tables from non-tabular data will also allow those with
disabilites and image disabled browsers a more meaningful experience
with your website and as more and more non computer devices are able to
access websites your site will be ready to go on them!
Jul 21 '05 #2
James A. Donald wrote:
--
I am just beginning to get into CSS. I like to keep all
my html simple and generic looking.

I want to use a table, because I have, (gasp) tabular
data. I want it to look like a table. Not only that,
but I want it to look like a plain ordinary
uncomplicated vanilla table, to look like everyone
else's table.

Seems to me that the only reasonably easy way to do this
is to declare the style transitional, and use <TABLE >

Is there a better way?


Yes, there is a better way. Use strict instead of transitional: TABLE
is not deprecated, just misused.
Jul 21 '05 #3
On Mon, 30 May 2005 17:02:21 -0700, James A. Donald
<ja****@echeque.com> wrote:
I want to use a table, because I have, (gasp) tabular
data. I want it to look like a table. Not only that,
but I want it to look like a plain ordinary
uncomplicated vanilla table, to look like everyone
else's table.

Seems to me that the only reasonably easy way to do this
is to declare the style transitional, and use <TABLE >

Is there a better way?


Yes: declare it _strict_, and use a <table>.

The idea that "you mustn't use tables" is an oversimplification. Not
even the most thoroughgoing purist would object to using <table> for
data that are actually tabular by nature. The objection is to using
<table> simply to enforce a layout -- _that_ is what should better
be done with CSS.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 21 '05 #4
"C A Upsdell" <""cupsdellXXX\"@-@-@XXXupsdell.com"> escribió en el mensaje
news:V7********************@rogers.com...
James A. Donald wrote:
--
I am just beginning to get into CSS. I like to keep all
my html simple and generic looking.

I want to use a table, because I have, (gasp) tabular
data. I want it to look like a table. Not only that,
but I want it to look like a plain ordinary
uncomplicated vanilla table, to look like everyone
else's table.

Seems to me that the only reasonably easy way to do this
is to declare the style transitional, and use <TABLE >

Is there a better way?


Yes, there is a better way. Use strict instead of transitional: TABLE is
not deprecated, just misused.

there's nothing wrong with <table> if you have tabular data.
the use of <table> is not recommended when it comes to
layout design.
Jul 21 '05 #5
SorbitoL wrote:
Yes, there is a better way. Use strict instead of transitional: TABLE is
not deprecated, just misused.


there's nothing wrong with <table> if you have tabular data.
the use of <table> is not recommended when it comes to
layout design.


What else did you think I meant?
Jul 21 '05 #6
C A Upsdell
Use strict instead of transitional: TABLE
is not deprecated, just misused.


When I use "strict" I get the error messages such as
: : Line 46, column 12: there is no attribute "WIDTH"
: : <TD width="47%">

Doubtless there is a CSS equivalent of WIDTH and I should know it, but
I cannot seem to find any examples of tables done under strict. There
is a web page that seems to be about tables done under strict,
http://www.w3.org/TR/REC-CSS2/tables.html but without any examples, I
find the web page mystifying and overwhelming.

That web page tells me there is such a thing as a width property, yet
I get error messages about that property when I use the W3C Markup
Validation Service


--
http://www.jim.com
Jul 21 '05 #7
James A. Donald <ja****@echeque.com> wrote:
When I use "strict" I get the error messages such as
: : Line 46, column 12: there is no attribute "WIDTH"
: : <TD width="47%">

Doubtless there is a CSS equivalent of WIDTH
Called "width", difficult eh?
and I should know it, but
I cannot seem to find any examples of tables done under strict. There
is a web page that seems to be about tables done under strict,
http://www.w3.org/TR/REC-CSS2/tables.html
That explain the CSS table model, use the HTML spec:
http://www.w3.org/TR/html4/struct/tables.html
but without any examples, I
find the web page mystifying and overwhelming.

That web page tells me there is such a thing as a width property, yet
I get error messages about that property when I use the W3C Markup
Validation Service


The width attribute has been deprecated for table cells, but not for
other elements such as table. Deprecated means that it's not valid under
the Strict DTD. http://www.w3.org/TR/html4/index/attributes.html

The reason why certain seemingly presentational attributes such as
valign are still valid under the Strict DTD is that in certain
situations moving them to css could result in a loss of structure which
can negatively effect the user's ability to interpret the content.

--
Spartanicus
Jul 21 '05 #8
On Tue, 31 May 2005 21:33:14 -0700, James A. Donald
<ja****@echeque.com> wrote:
C A Upsdell
Use strict instead of transitional: TABLE
is not deprecated, just misused.
When I use "strict" I get the error messages such as
: : Line 46, column 12: there is no attribute "WIDTH"
: : <TD width="47%">

they are probably telling you in strict there is no inline style, so
no width inline
try defining width up in the head then move it to separate style
sheetDoubtless there is a CSS equivalent of WIDTH and I should know it, but
I cannot seem to find any examples of tables done under strict. There
is a web page that seems to be about tables done under strict,
http://www.w3.org/TR/REC-CSS2/tables.html but without any examples, I
find the web page mystifying and overwhelming.

http://www.sturgood.com/dna/result/
in this example I group floating tables inside separate divs. valid
strict html and css.
I define no width on the tables or divs though to allow for
flexibility. For people like me there is finally the ability to
increase the font size to read tabular data.

cheers
johnSteve

Jul 21 '05 #9
"Spartanicus" <in*****@invalid.invalid> wrote in message
news:dh********************************@news.spart anicus.utvinternet.ie...
James A. Donald <ja****@echeque.com> wrote:
That web page tells me there is such a thing as a width property, yet
I get error messages about that property when I use the W3C Markup
Validation Service


The width attribute has been deprecated for table cells, but not for
other elements such as table. Deprecated means that it's not valid under
the Strict DTD. http://www.w3.org/TR/html4/index/attributes.html


That would be in regard to attributes in the manner of <td width="10%">, as
opposed to <td style="width:10%">, right?
Jul 21 '05 #10
"Tony" <so*****@somewhere.not> wrote:
The width attribute has been deprecated for table cells, but not for
other elements such as table. Deprecated means that it's not valid under
the Strict DTD. http://www.w3.org/TR/html4/index/attributes.html


That would be in regard to attributes in the manner of <td width="10%">, as
opposed to <td style="width:10%">, right?


Correct. In the latter example "style" is the attribute, "width" is the
property of a css rule, with "10%" as it's value.

Note that using inline css such as in the latter example is rarely good
practice.

--
Spartanicus
Jul 21 '05 #11
"Spartanicus" <in*****@invalid.invalid> wrote in message
news:o0********************************@news.spart anicus.utvinternet.ie...
"Tony" <so*****@somewhere.not> wrote:
The width attribute has been deprecated for table cells, but not for
other elements such as table. Deprecated means that it's not valid under
the Strict DTD. http://www.w3.org/TR/html4/index/attributes.html
That would be in regard to attributes in the manner of <td width="10%">,
as
opposed to <td style="width:10%">, right?


Correct. In the latter example "style" is the attribute, "width" is the
property of a css rule, with "10%" as it's value.


That's what i thought.
Note that using inline css such as in the latter example is rarely good
practice.


Was mainly doing it to make the difference clear
Jul 21 '05 #12
James A. Donald
When I use "strict" I get the error messages such as
: : Line 46, column 12: there is no attribute "WIDTH"
: : <TD width="47%">

johnSteve they are probably telling you in strict there is no inline style, so
no width inline
try defining width up in the head then move it to separate style
sheet
What I have done is moved the width attribute to a <COL width=47%><COL
width=53%>, inside the <TABLE></TABLE> but above the <TR></TR>

This fixed the problem, works in strict, and seems a lot better than
the old way (since table formatting code should not have to look
ahead)

Obviously the truly correct thing to do is to create a style sheet
with various table styles corresponding to tables with different <COL>
attributes, effectively moving the <COL> attributes to a style sheet.

Not clear to me how to move the <COL> data into a style sheet. Cannot
seem to find any examples.
http://www.sturgood.com/dna/result/
in this example I group floating tables inside separate divs. valid
strict html and css.
I define no width on the tables or divs though to allow for
flexibility. For people like me there is finally the ability to
increase the font size to read tabular data.


You have moved your <table> properties into the <STYLE> command and
similarly for your <TD> properties, but no column width properties. I
would expect them to go into a table class.

I attempted to move my now working table attributes into a style
command

<STYLE type=text/css>{
}
TABLE {
BORDER:1; WIDTH:100%;
<COL width="34%"><COL width="66%">
}
</STYLE>

The parser was happy with it, but the output was total crap. No
borders, and the first table the first column was 66% and the second
34%, and in the next table the other way around

--
http://www.jim.com
Jul 21 '05 #13
On Wed, 01 Jun 2005 10:56:42 -0600, johnSteve <st****@bresnan.net>
wrote:
they are probably telling you in strict there is no inline style, so
no width inline


Huh? Inline styles are just fine in HTML 4.01 Strict.

For <td> in particular, refer to
http://www.w3.org/TR/html401/struct/....html#h-11.2.6
and note that core attributes are allowed. Core attributes are
defined at
http://www.w3.org/TR/html401/sgml/dtd.html#coreattrs
and include style.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"I feel a wave of morning sickness coming on, and I want to
be standing on your mother's grave when it hits."
Jul 21 '05 #14
Gee Im honored Ive been quoted here (found it in my copyscape) but
everything I said in that article on my site is 100% and if you care at
all about your SE rankings you'll learn tableless layouts and fast! Man
your rankings can go through the roof!

If you want a great place to learn this stuff Im a member of
sitepoint.com ... some of the best CSS gurus in the world over there
will help you work thru the hard times you'll have switching. It sucks
at first but one you learn it you wonder why you ever used tables for
non tabular data!

thanks again for the quote!

Jul 21 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Benjamin | last post by:
Hello, I need some advice on a financial application I'm doing. First, I suppose I should give a little background so you know where I'm coming from. For 5 years I earned my living doing COBOL...
8
by: Sean Shanny | last post by:
To all, The facts: PostgreSQL 7.4.0 running on BSD 5.1 on Dell 2650 with 4GB RAM, 5 SCSI drives in hardware RAID 0 configuration. Database size with indexes is currently 122GB. DB size...
0
by: Bill Smith | last post by:
I am looking for an example 'after insert' trigger that performs an update to a column in the master table. For example, I have an 'orders' table that contains a 'PartNum' column. I would like to...
1
by: Chris Uwins | last post by:
Hi there, i know theres a number of ways I can achieve this but want to know the best, (but still quite simple). Up until a year ago I never used Access but have designed a few databases for...
4
by: Stefan Kowalski | last post by:
I recently posted a question which was answered by Allen Browne and gave me some tips to structure the tables. However, when it comes to searching the database, performance is unacceptably slow...
1
by: Kevin | last post by:
Hi All Can someone tell me if I am doing this correctly, or can possibly suggest better ways, if I'm not doing this correctly. I have a windows application that I am writing,So I have a UI and...
3
by: Lerp | last post by:
Hi all, I am building an app that has a lot of one to many relationships and was curious as to the best method in displaying rows of data from both tables on the same line. ie: row1 of...
2
by: mvl_groups_user | last post by:
I am trying to look up data on about 1000 records from a 6 million record view on a DB2 database using msaccess. The 6 million record DB2 view is connected through a linked ODBC table (table A),...
2
by: Gorf | last post by:
Hi, all. Using Access 2K. I think what I'm trying to do is quite simple, but I've been out of the loop for a few years so I've forgotten much. I have a table of records each of which can...
4
by: Arun Srinivasan | last post by:
Hi I was using a query previously, that was efficient select * from table where pred1 and pred2 and pred3; Later I was asked to introduce new ones, but they were not based on table columns but...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.