473,837 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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/cGwvITnSR3Tdzcl VpR0+pr3YYQdkG
I+ZMSazMMSKlfyX +QwvlSFcNl49Faf n5glRFYcFV
4SY3/GBXA3FTNgCjcJdo kwMMCbs5dlavAIp G3504w
--
http://www.jim.com
Jul 21 '05
14 4196
"Tony" <so*****@somewh ere.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
"Spartanicu s" <in*****@invali d.invalid> wrote in message
news:o0******** *************** *********@news. spartanicus.utv internet.ie...
"Tony" <so*****@somewh ere.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%"><CO L 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
2844
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 programming with some occasional VB and web programming with ASP. Prior to that I went to a technical college where I took a couple of courses in c, c++ and pascal. Although now about all I can do is the basic "hello world" type applications in...
8
4615
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 before we completed the vacuum full was 150GB. We have recently done a major update to a table, f_pageviews, in our data warehouse. The f_pageviews table contains about 118 million rows.
0
3582
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 translate the part number coming in on the inserted record to a new part number by doing a lookup in a second table 'PartNumConversion' table that contains 2 columns 'oldPartNum', 'newPartNum'. I would also like to log the oldPartNum and...
1
2102
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 work. I am working on Access 2000. I have basic SQL/VB skills - and am pretty accomplished at putting the databases together. Anyway...I've created a database to keep track of "Dayworks" we are
4
1298
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 and I am now thinking of doing the unthinkable with my tables and wonder whether anyone has used (or still uses) this sort of approach. The database stores libraries and classifies the types of book they keep. So I have the classic 3-table...
1
1355
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 I have another class that handles the inserts,updates etc to a specific table/s in the database,(I actually have multiple classes that do more or less the same thing, but for different sets of tables in the database) Then in my UI code I have a...
3
1355
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 100 for example in my datagrid:
2
1875
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), and the 1000 primary key numbers I want are in a local msaccess table (table B). The most obvious solution is to join table A and B, but this is excruciatingly slow performance-wise.
2
1198
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 belong to multiple categories. I have a table of all the categories available. I have a crossreference table which links records to categories.
4
3888
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 variables declared in SP. select * from table where pred1 and pred2 and pred3 and variable1 ='number1 and variable2 =number2;
0
9852
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9696
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10902
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10583
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9420
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7824
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7014
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4481
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.