473,394 Members | 1,813 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.

Transition from table layout to CSS: Am I stupid?

Hello,

I'm familiar with using tables for web page layout. Now I'm doing
a new page, and while I'm at it, I thought, why not do it right
and use only CSS and DIVs.

The page in question is a simple columnar layout. What I'd like
to accomplish is that all three columns are at least the height
of the browser window (even if their content is shorter), and if
the content of any column is longer than the others and goes
beyond the bottom of the page, I want the shorter columns to
extend accordingly. Like a table would, too.

Well, the result so far is an absolute, complete disaster. I've
managed to create a page that renders differently on four
different browsers, always wrong, and IE isn't even among them.

Look at the page here: http://www.stoptrick.com/new/index.html.

Here is a page with a bit more explanatory text and some
browser screenshots:

http://www.stoptrick.com/csstrouble/index.html

Thanks for any suggestions.

--Daniel
Oct 19 '05 #1
13 1794
"Daniel Haude" wrote:
Thanks for any suggestions.


Here are a couple:

1. Search Google for "quirks mode".
2. Ask in a CSS group.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
Oct 19 '05 #2
On 19 Oct 2005, Daniel Haude wrote:
I thought, why not do it right and use only CSS and DIVs.


Yes, right! Use HTML 4.01 Compact - it has *no* elements but
DIV and SPAN.

scnr

--
Netscape 3.04 does everything I need, and it's utterly reliable.
Why should I switch? Peter T. Daniels in <news:sci.lang>

Oct 19 '05 #3
On 19 Oct 2005 12:25:26 GMT, Daniel Haude <mu****@yahoo.com> wrote:
if the content of any column is longer than the others and goes
beyond the bottom of the page, I want the shorter columns to
extend accordingly. Like a table would, too.


So use a <table> When you couple the behaviour of these elemetns
together like this, you are implictly defining them to be a related set
of elements - or a table.

Tables aren't bad, it's just that they were mis-used when not necessary.
if you're doing something that really is "table like", then go with the
table.

Oct 19 '05 #4
On 2005-10-19, Philip Ronan <in*****@invalid.invalid> wrote:
1. Search Google for "quirks mode".
Oh. I see. OK, most of my problems solved. At least the rendering
now agrees with what the book says.
2. Ask in a CSS group.


Good tip, although I think the HTML and CSS groups aren't all
that disjunct. I know that, technically, they have nothing to do
with each other, but they tend to exits in cohabitation...

Thanks,
--Daniel

Oct 19 '05 #5
Andy Dingley wrote:
On 19 Oct 2005 12:25:26 GMT, Daniel Haude <mu****@yahoo.com> wrote:
if the content of any column is longer than the others and goes
beyond the bottom of the page, I want the shorter columns to
extend accordingly. Like a table would, too.


So use a <table> When you couple the behaviour of these elemetns
together like this, you are implictly defining them to be a related set
of elements - or a table.


Presentation does not define semantics. A layout with tabular
presentation is not any more semantically tabular than a layout with
non-tabular presentation. If you want tabular presentation without the
semantics, use display:table and friends.
Oct 21 '05 #6
On Fri, 21 Oct 2005 00:59:32 GMT, Leif K-Brooks <eu*****@ecritters.biz>
wrote:
Presentation does not define semantics.


No, but binding the behaviour of two columns together like this, when
the behaviour is "match the other column" rather than "both be 80% of
the page height" _is_ coupling two units together in a manner that can
only be described as table-like.
Oct 21 '05 #7
Andy Dingley wrote:
On Fri, 21 Oct 2005 00:59:32 GMT, Leif K-Brooks <eu*****@ecritters.biz>
wrote:
Presentation does not define semantics.


No, but binding the behaviour of two columns together like this, when
the behaviour is "match the other column" rather than "both be 80% of
the page height" _is_ coupling two units together in a manner that can
only be described as table-like.


The two columns are coupled _in_presentation_only_. Equal heights and
semantic connection are unrelated issues.
Oct 21 '05 #8
On Fri, 21 Oct 2005 13:02:04 GMT, Leif K-Brooks <eu*****@ecritters.biz>
wrote:
The two columns are coupled _in_presentation_only_. Equal heights and
semantic connection are unrelated issues.


So they're coupled, so they're a table. How else are you going to do
this in HTML ?
Oct 21 '05 #9
Andy Dingley wrote:
On Fri, 21 Oct 2005 13:02:04 GMT, Leif K-Brooks <eu*****@ecritters.biz>
wrote:
The two columns are coupled _in_presentation_only_. Equal heights and
semantic connection are unrelated issues.


So they're coupled, so they're a table. How else are you going to do
this in HTML ?


They're coupled _in_presentation_. HTML defines semantics, not
presentation. You use CSS (specifically display:table) for presentation.
Oct 21 '05 #10
On Fri, 21 Oct 2005 18:35:05 GMT, Leif K-Brooks <eu*****@ecritters.biz>
wrote:
They're coupled _in_presentation_. HTML defines semantics, not
presentation. You use CSS (specifically display:table) for presentation.


Your moralisitic high ground is failing to meet the needs of the user.

How do you do this in CSS then ? Where's the property for
height: just-like-the-one-next-door;

As anyone from a programming (rather than a design) background will
recognise, coupling between modules can be described as a "bad" thing.
However if you don't couple them at all, then your program falls in
half. Equally the absolutist view of "tables are only for telephone
directories" is perhaps desirable, but not attanable in all situations.
This is one of those situations - it may be "presentational" in nature,
but it relies on coupling two things together (the column heights) that
are not coupleable with CSS, but are easily coupled with HTML and
<table>.

Oct 22 '05 #11
Andy Dingley wrote:
On Fri, 21 Oct 2005 18:35:05 GMT, Leif K-Brooks
<eu*****@ecritters.biz> wrote:
They're coupled _in_presentation_. HTML defines semantics, not
presentation. You use CSS (specifically display:table) for
presentation.


How do you do this in CSS then ? Where's the property for height:
just-like-the-one-next-door;


I've mentioned display:table twice now. When are you going to notice?
Oct 22 '05 #12
On Sat, 22 Oct 2005 12:46:46 +0100,
Andy Dingley <di*****@codesmiths.com> wrote
in Msg. <4e********************************@4ax.com>
As anyone from a programming (rather than a design) background will
recognise, coupling between modules can be described as a "bad" thing.
However if you don't couple them at all, then your program falls in
half. Equally the absolutist view of "tables are only for telephone
directories" is perhaps desirable, but not attanable in all situations.
This is one of those situations - it may be "presentational" in nature,
but it relies on coupling two things together (the column heights) that
are not coupleable with CSS, but are easily coupled with HTML and
<table>.


Hi guys,

thanks for fighting this out on my behalf, but I've solved the problem
in a different manner (my 100%-high navbar now resides in an absolutely
fixed DIV on the left).

But back to the academic dispute about equally high columns: Shouldn't
it be possible to put the stuff into two adjacent DIVs inside a
containing DIV. Now position the inside DIVs with relative; top: 0px;
bottom: 0px. Shouldn't the bigger inside DIV then bloat the outside DIV
to the required proportions, forcing the other inside DIV to grow with
it?

Or if we know which inside DIV will grow bigger, we'll let that one be a
float:right one and position the other one relative.

I'm too lazy to try it now.

robert
Oct 24 '05 #13
Robert Latest wrote:

Shouldn't
it be possible to put the stuff into two adjacent DIVs inside a
containing DIV. Now position the inside DIVs with relative; top: 0px;
bottom: 0px.


Anything is possible, theoretically. In practice, browser support for
bottom positioning is sketchy but is getting better. IE sucks, of course. ;)

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Oct 24 '05 #14

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

Similar topics

9
by: alex | last post by:
Hi, It seems like HTML 4.01 Transitional spec. doesn't allow table height to be expressed in percents. When i have this doctype tag: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
7
by: mr_burns | last post by:
hi, is the table percent value for height used for displaying in browsers. i have a table i want to run to the bottom of the screen so it seemed best to set the height value to 100%. when i...
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
28
by: Anthony Williams | last post by:
Good morning, I'm currently designing a site, using CSS, and wish to create a variable width two-column layout, with header and footer, and one fixed-width column on the left. Previously, I...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
41
by: Andy Dingley | last post by:
http://thedailywtf.com/forums/thread/74148.aspx
13
by: Davo | last post by:
Hi Folks, There seems to be something about not using tables for layout, but use divs instead. I'm not sure if I've got this right. If the output looks like what you want, then it shouldn't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.