473,654 Members | 3,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to teach coworkers DIV & CSS?

I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES. This is to explain to the
people we outsource things to, how we want it done.

I dug around alistapart but couldn't find anything complete enough. I
searched through the W3C, but could only find the standards, not how to
apply them in the desired way.

Does anyone have some handy links for me??? Replying them here might also be
helpful to other readers :)

Woolly
Jul 20 '05 #1
40 5116

"Woolly Mittens" <wm******@hotma ilz.com> wrote in message
news:40******** *************** @news.versatel. net...

These sites went some way:
http://www.webreference.com/authorin...yout/advanced/

http://www.yourhtmlsource.com/styles...csslayout.html

http://www.westciv.com/style_master/...aying_out.html

Any better finds?
Jul 20 '05 #2
On Tue, 20 Apr 2004, Woolly Mittens wrote:
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES.


You should avoid using the DIV element, which has no meaning and is only
a "last resort". Rather use elements with defined semantics like P, H1,
H2, etc.

Jul 20 '05 #3

"Andreas Prilop" <nh******@rrz n-user.uni-hannover.de> wrote in message
news:Pine.GSO.4 .44.04042015154 20.13467-100000@s5b003.. .
On Tue, 20 Apr 2004, Woolly Mittens wrote:
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES.


You should avoid using the DIV element, which has no meaning and is only
a "last resort". Rather use elements with defined semantics like P, H1,
H2, etc.


http://www.w3.org/TR/html401/struct/....html#edef-DIV
" The DIV and SPAN elements, in conjunction with the id and class
attributes, offer a generic mechanism for adding structure to documents.
These elements define content to be inline (SPAN) or block-level (DIV) but
impose no other presentational idioms on the content. Thus, authors may use
these elements in conjunction with style sheets, the lang attribute, etc.,
to tailor HTML to their own needs and tastes. "

IOW, DIV is appropriate for doing exactly what the OP wants to do.

-Karl
Jul 20 '05 #4

"Andreas Prilop" <nh******@rrz n-user.uni-hannover.de> wrote in message
news:Pine.GSO.4 .44.04042015154 20.13467-100000@s5b003.. .
On Tue, 20 Apr 2004, Woolly Mittens wrote:
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES.
You should avoid using the DIV element, which has no meaning and is only
a "last resort".


"This is an integral component of my document" is a perfectly meaningful use
of DIV, and the only semantic deficiency in using DIV is the one imposed by
using HTML in the first place instead of XML.
Rather use elements with defined semantics like P, H1,
H2, etc.


Jul 20 '05 #5
"Andreas Prilop" <nh******@rrz n-user.uni-hannover.de> wrote in message
news:Pine.GSO.4 .44.04042015154 20.13467-100000@s5b003.. .
On Tue, 20 Apr 2004, Woolly Mittens wrote:
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES.


You should avoid using the DIV element, which has no meaning and is only
a "last resort". Rather use elements with defined semantics like P, H1,
H2, etc.


Thanks for not answering my question... again.
Jul 20 '05 #6

"Woolly Mittens" <wm******@hotma ilz.com> wrote in message
news:40******** *************** @news.versatel. net...
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES. This is to explain to the
people we outsource things to, how we want it done.


As someone who relies on a ton of outsourcing, I recommend NOT giving
production work to someone who doesn't understand what you want.
Your job isn't to teach people how to author CSS instead of tables.

I have a whole stable of freelancers I rely on for overflow work. If I need
something done in PHP, I don't call my .NET guy, even if he knows some PHP.
I call the best person for the job.
If your freelancers don't know CSS, then find someone who does.

-Karl
Jul 20 '05 #7

"Karl Groves" <ka**@NOSPAMkar lcore.com> wrote in message
news:c6******** **@ngspool-d02.news.aol.co m...

"Woolly Mittens" <wm******@hotma ilz.com> wrote in message
news:40******** *************** @news.versatel. net...
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES. This is to explain to the people we outsource things to, how we want it done.
As someone who relies on a ton of outsourcing, I recommend NOT giving
production work to someone who doesn't understand what you want.
Your job isn't to teach people how to author CSS instead of tables.

I have a whole stable of freelancers I rely on for overflow work. If I

need something done in PHP, I don't call my .NET guy, even if he knows some PHP. I call the best person for the job.
If your freelancers don't know CSS, then find someone who does.


I would if I had a choice. They're from <insert warzone here> and they have
to know what my boss promised our customers. It has to be outsourced to
them, and I doubt there are many more of "them" in <insert warzone here>. :)
Jul 20 '05 #8
Woolly Mittens wrote:
I was asked to find some documentation which explains how to develop a
website using DIV's and CSS, instead of TABLES. This is to explain to
the people we outsource things to, how we want it done.
To avoid the diversions you have got so far, perhaps it is better to talk
about "tableless-layout"! I've seen arguments about whether or not it is
really about <div>s a number of times. They are really tactical.
I dug around alistapart but couldn't find anything complete enough. I
searched through the W3C, but could only find the standards, not how
to apply them in the desired way.
Where do you want to start? The frustration that I felt when learning how to
do tableless layout last year was that there didn't appear to be a systematic
"top-down method" for turning a layout concept into a combination of skeleton
HTML + positioning CSS. I'm used to using top-down methods.

The stuff in the web appears mainly to be about how to apply a portfolio of
known tricks, or reverse-engineering an existing page. If you were designing a
motor car or a computer package or a new building, I would hope that it could
be done using a systematic sequence of analysis that would gradually refine
the design from broad concepts to the fine detail. I didn't find that,
although perhaps it is there and I just missed it.
Does anyone have some handy links for me??? Replying them here might
also be helpful to other readers :)


I'll sketch out what I do, in the hope that it will either be useful to
others, or will cause people to identify the sort of tutorial I was after.
Since I normally produce a template that I then re-use many times, the trick
is to implement that template & its corresponding CSS.

I start by drawing boxes on paper, or via a computer package. (I've used
PowerPoint for the purpose). I try to draw the layout concept in the form of a
set of non-overlapping boxes. It can't always be done, but if it can you have
made a good start. This is really the "visual hierarchy".

It is necessary (perhaps unfortunately) to know the limitations of CSS2 to
draw the right sort boxes. The problem is that layout isn't simply about the
position of boxes on a page. (That is the easy bit!) It is also about their
styles, especially borders & backgrounds. Those screw up many attempts. How do
you draw boxes that reach down to the footer instead of stopping at the bottom
of the content of a sidebar? Etc.

These boxes eventually get turned into wrapping & nesting & sequencing of the
outer-level elements in the document. (The ones that often have IDs, because
they often exist just once per page). There may be about 5 to 10 of these.
(These also correspond to the cells of a simple layout table if you are using
tables. A simple layout table is just another way of managing the wrapping &
nesting & sequencing of the outer-level elements in the document. It isn't a
different concept).

I develop the skeleton HTML & corresponding CSS in parallel. (I have both of
them open in Dreamweaver, and keep switching between them. Unfortunately, at
this stage I often write the HTML directly rather than use WYSYWIG view,
because I can't afford ambiguity. But I expect this to change in future, as I
get to know MX2004 more). I tend to give the boxes diagnostic borders &
background colours, and I keep 5 browsers pointing at the skeleton page being
developed so that I can keep checking whether I am attempting something
impossible in one of the browsers.

I then gradually refine the details. It didn't matter at first that the
margins were several pixels adrift. Later it does. (Unfortunately, I've had
designs fail at this stage because I can't make browsers converge. It is,
surprise surprise, often the IE 5 box model that blows things apart).

I tend to find that what goes into those 5 to 10 boxes is much easier to
handle. Often, it is a matter of copying lots of stuff from other CSSs, to be
refined later.

I would be interested to know how others handle this initial stage? Or do
other people just "know" how to form the basic elements?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #9
Karl Groves wrote:
"Andreas Prilop" wrote ...
On Tue, 20 Apr 2004, Woolly Mittens wrote:
I was asked to find some documentation which explains how to
develop a website using DIV's and CSS, instead of TABLES.


You should avoid using the DIV element, which has no meaning and is
only a "last resort". Rather use elements with defined semantics
like P, H1, H2, etc.


http://www.w3.org/TR/html401/struct/....html#edef-DIV " The DIV
and SPAN elements, in conjunction with the id and class attributes,
offer a generic mechanism for adding structure to documents.

IOW, DIV is appropriate for doing exactly what the OP wants to do.


Unless there is another, more appropriate, element at hand, which was A.
Prilop's point. I once came accross something like this on a news web page:

<table>
<tr><td>&bull ; news item</td>
<td>&bull; news item</td><!-- etc. -->
</tr></table>

If the author of that page asked how to change this from table layout to
div + css, what advice should we give?

<div>&bull; news item</div>
<div>&bull; news item</div>

Ok, that's better than the original; instead of lying about the content
(calling it table when it is not), it says nothing. But it is hardly
optimal. How about the obvious?

<ul>
<li>&bull; news item</li>
<li>&bull; news item</li>
</ul>

The point isn't to change from table layout to div + css. It is change
from table layout to appropriate markup, then use css to alter the
default presentation. If the markup has nothing specifically appriate,
then by all means, use div and span. But, as Prilop said, they should be
used only when nothing else fits the bill.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

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

Similar topics

1
11435
by: DrTebi | last post by:
Hello, I have the following problem: I used to "encode" my email address within links, in order to avoid (most) email spiders. So I had a link like this: <a href="mailto:DrTebi@yahoo.com">DrTebi</a> This would work like a regular mailto link in any browser, but wouldn't be visible to spiders if they don't have a function to decode it.
0
2413
by: Thomas Scheffler | last post by:
Hi, I runned in trouble using XALAN for XSL-Transformation. The following snipplet show what I mean: <a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a> <a href="http://blah.com/?test=test&amp;amp;test2=test2">Test2&amp;amp;</a> This results in the following HTML Code:
4
3217
by: johkar | last post by:
When the output method is set to xml, even though I have CDATA around my JavaScript, the operaters of && and < are converted to XML character entities which causes errors in my JavaScript. I know that I could externalize my JavaScript, but that will not be practical throughout this application. Is there any way to get around this issue? Xalan processor. Stripped down stylesheet below along with XHTML output. <?xml version='1.0'?>...
2
2581
by: Bret Busby | last post by:
In searching on the Internet, I found various references to the book "Teach Yourself PostgreSQL In 21 Days", written by Chris Smith, published by SAMS, December 2002 (from the Barnes and Noble web site), ISBN 0672324830, 600 pages (from http://202.113.6.251/cat/books/0672324830.html). References to it, are easily found by doing a google search on the string "teach yourself postgresql". After contacting SAMS about the book, as I could...
33
2383
by: Jacob Oost | last post by:
Should I get some more general books, like "advanced self-teaching," or can I start on specialized books like "Linux game programming?" Any book recommendations? -- ----- BEGIN GEEK CODE BLOCK ----- Version 3.1 GAT d? !s !a C++++ UL+ P L++ E- W+ N+ o-- K- w-- O- !M !V PS-- PE++ Y+ PGP- t++>++++* 5? !X-- R- tv b++ DI+ D++
14
5921
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only because of this, so I hope some of you gurus can enlighten me with this :) In what circumstances can the "&amp;" in the source code be involuntary changed to "&" by a browser when or other software, when editing and uploading the file to the web...
11
3759
by: efrat | last post by:
Hello, I'm planning to use Python in order to teach a DSA (data structures and algorithms) course in an academic institute. If you could help out with the following questions, I'd sure appreciate it: 1. What exactly is a Python list? If one writes a, then is the complexity Theta(n)? If this is O(1), then why was the name "list" chosen? If this is indeed Theta(n), then what alternative should be used? (array does not seem suited for...
12
10092
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b) ..... // xsl contents abc.aspx?p1=v1&amp;p2=<xsl:value-of select="$v2" />
25
2074
by: vikram Bhuskute | last post by:
I have plans to train some students for C in coming weeks. I am badly looking for C programming assignments fot them. Need 1) lots of them per topiic 2) Should be doable for beginners thanks in advance Vikram
0
8372
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
8814
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
8706
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...
1
8475
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6160
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
5621
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();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4293
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.