473,399 Members | 2,159 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,399 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 5253
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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,...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.