473,240 Members | 1,748 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,240 software developers and data experts.

Formatting columns without table - where are documents ?

W3C says somewhere that tables should not be used for formatting
columns etc. but that style sheets should be used instead. This has a
major unlearning/relearning implications for me (and just about everyone
else I suppose). That also makes Hotdog ver 6.5 and "Using htnl 4" by
Molly Holzschlag Publ Que instantly out-of-date! Where are the
documents that show you how to do this? The tutorial on the W3C site is
too elementary for me.

The W3C validator page itself uses this recommended technique but I
have no reference about much of the code it uses. For example:
@import url (alpha import??)
div.navbar {
float: right;
text-align: right;
text-decoration: none;
margin: .1ex .1ex 2.5ex 1ex;
padding: 1ex;
background-color: #eee;
border-left: 1px solid black;
clear: both;
width: 8em;
}
(float?? ex??)

This code properly places a navigation bar which I would have used a
table to create. And so and so forth... ???

TIA

--
My e-mail address to fox the pesky spammers is vbien at attglobal dot net

Jul 20 '05 #1
2 5246
Victor Bien wrote:
W3C says somewhere that tables should not be used for formatting
columns etc. but that style sheets should be used instead.
I wouldn't see that as strict as it may sound. Of course, tables are
not meant for layout issues and one should avoid it whenever it's
possible. But in some cases it might be better to use one (one!)
simple table for layout instead of many floated or absolute positioned
elements, which may raise lots of problems in some (older) browsers
and (maybe) decrease the usability of the site.

On my pages I sometimes use the "best of both worlds" - one single
table with 2 or 3 cells for the main layout, CSS for all the rest.

Sometimes you just have to find a compromise between strictly
following the recommendations and usability.
Where are the
documents that show you how to do this? The tutorial on the W3C site is
too elementary for me.
Currently I have no links (at least not in English *g*), but I'm sure
Google knows lots of them.
The W3C validator page itself uses this recommended technique but I
have no reference about much of the code it uses.
The official recommendation is the reference.
http://www.w3.org/TR/REC-CSS2/
For example:
@import url (alpha import??)
div.navbar {
float: right;
[...]
margin: .1ex .1ex 2.5ex 1ex;
[...]
}
(float?? ex??)

This code properly places a navigation bar which I would have used a
table to create. And so and so forth... ???


The navbar is positioned on the right of the surrounding element (body
in this case), the rest of the text floats around it.

9.5.1 Positioning the float: the 'float' property
http://www.w3.org/TR/REC-CSS2/visure...float-position

See the difference:

Using a table Using CSS and
____________ floated elements
| | | ____________
| text | nav | | | |
| text | | | text | nav |
| text | | | text |_____|
| text | | | text text |
| text | | | text text |
| text | | |____________|
|______|_____|

So using floating elements can save you a lot of space which would be
wasted with table layout.

And for the ex values have a look at

4.3.2 Lengths
http://www.w3.org/TR/REC-CSS2/syndata.html#length-units

HTH
Micha

Jul 20 '05 #2
In article <bf**********@merki.connect.com.au> in
comp.infosystems.www.authoring.html, Victor Bien
<ni*****@smartchat.net.au> wrote:
@import url (alpha import??)
div.navbar {
float: right;
text-align: right;
text-decoration: none;
margin: .1ex .1ex 2.5ex 1ex;
padding: 1ex;
background-color: #eee;
border-left: 1px solid black;
clear: both;
width: 8em;
}
(float?? ex??)


If the W3C tutorial is "too elementary for" you as you say, then
surely reading the spec is possible? All these things are explained
there. (See URL below.)

Granted, sometimes it is not immediately obvious how to put various
elements from the spec together to achieve a desired end, but you
seem to be asking about particular details and there's no better way
to answer those questions than to read the spec. Fortunately it is
well indexed and well hyperlinked, and you can jump right to the
paragraph that answers each question.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #3

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

Similar topics

4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
0
by: scooterm | last post by:
### Question Can anyone name a text editor or XML editor (prefer open source) that can open a simple table XML file in a spreadsheet-type GUI, without adding any extra formatting or junk to the...
20
by: Andy Fish | last post by:
Hi All, I have a nice easy table and/or CSS formatting problem for any gurus out there. I have a table with 4 columns - no "width" attribute on anything. Some rows have 4 cells in (call...
3
by: Chuck Reed | last post by:
I am working on a sales report where I show weekly sales by category for each of the 52 weeks in the year. Each record in my table/report has the 52 weeks of sales in it. I want to highlight to top...
8
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
12
by: dmieluk | last post by:
Problem: When moving between records, I need to control which combo/text boxes are displayed on the current form, dependent upon data in the current record. More: I building my first...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
2
by: jodyblau | last post by:
I'm not certain that what I am trying to do is possible; in any event I haven't been able to figure it out. Here is what I am trying to do: I have one table that has a list of cases I'm working...
10
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.