473,508 Members | 2,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I will return to tables

http://dardel.info/Eau.html

What I wanted to achieve was not really complicated: essentially a left
hand column with a 75% width, and a right hand column containing
occasional right-flush picts, plus some stuff filling the whole horiz
space.

I developed that very nicely, it was exactly what I wanted under Safari
or Firefox (Mac), but when I opened it under MSIE it was all over the
place, none of the widths was OK, and the Mac and PC versions were also
different.

What you will see if you click the above is something that is more or
less acceptable in all browsers I have tested, but none is exactly what
I aimed at, and I had to resort to some hack about widths so it renders
acceptably under IE as well as the more compliant browsers.

If anybody has a way to make it better, I'd be immensely grateful.
However, I am seriously considering to return to the table layouts that
I used a few years ago. There are less surprises to expect.

--
François de Dardel
http://dardel.info/
Faber est suae quisque fortunae
Enlever le quatorze pour m'écrire
Remove fourteen in the address to send mail

Feb 5 '07 #1
24 2087
François de Dardel wrote:
http://dardel.info/Eau.html

What I wanted to achieve was not really complicated: essentially a
left hand column with a 75% width, and a right hand column containing
occasional right-flush picts, plus some stuff filling the whole horiz
space.

I developed that very nicely, it was exactly what I wanted under
Safari or Firefox (Mac), but when I opened it under MSIE it was all
over the place, none of the widths was OK, and the Mac and PC
versions were also different.

What you will see if you click the above is something that is more or
less acceptable in all browsers I have tested, but none is exactly
what I aimed at, and I had to resort to some hack about widths so it
renders acceptably under IE as well as the more compliant browsers.

If anybody has a way to make it better, I'd be immensely grateful.
However, I am seriously considering to return to the table layouts
that I used a few years ago. There are less surprises to expect.
You can use display: table, display: table-row and display: table-cell to
make Html elements behave like a table. Unfortunately IE doesn't support
this part of the Css standard, but you can hack around it with conditional
comments. See:

http://nrkn.com/displayTable/
Feb 5 '07 #2
"Nik Coughlin" <nr******@gmail.comwrote:
>However, I am seriously considering to return to the table layouts
that I used a few years ago. There are less surprises to expect.

You can use display: table, display: table-row and display: table-cell to
make Html elements behave like a table.
CSS tables used to create a layout grid share all of the nasty drawbacks
of HTML tables used to create a layout grid minus the false semantics
(arguably the least important problem).

--
Spartanicus
Feb 5 '07 #3
On 2007-02-05 23:36:23 +0100, "Nik Coughlin" <nr******@gmail.comsaid:
François de Dardel wrote:
>http://dardel.info/Eau.html

What I wanted to achieve was not really complicated: essentially a
left hand column with a 75% width, and a right hand column containing
occasional right-flush picts, plus some stuff filling the whole horiz
space.

You can use display: table, display: table-row and display: table-cell
to make Html elements behave like a table. Unfortunately IE doesn't
support this part of the Css standard, but you can hack around it with
conditional comments. See:

http://nrkn.com/displayTable/
Thanks but if there were no IE life would be easier. I precisely would
like to avoid conditional comments. I found a hack that helps with
widths, I would prefer to avoid a hack. If I wanted to do tables I
would do HTML tables, not mimic their behaviour with CSS.

I have put a version of this page with borders so it is more obvious:
http://dardel.info/test.html

--
François de Dardel
http://dardel.info/
Faber est suae quisque fortunae
Enlever le quatorze pour m'écrire
Remove fourteen in the address to send mail

Feb 5 '07 #4
Spartanicus wrote:
"Nik Coughlin" <nr******@gmail.comwrote:
>>However, I am seriously considering to return to the table layouts
that I used a few years ago. There are less surprises to expect.

You can use display: table, display: table-row and display:
table-cell to make Html elements behave like a table.

CSS tables used to create a layout grid share all of the nasty
drawbacks of HTML tables used to create a layout grid minus the false
semantics (arguably the least important problem).
Would you happen to have any links to resources that explain this in more
detail? Sounds like something I should look into. I don't use display:
table generally, so I've not come across this before.
Feb 6 '07 #5
François de Dardel wrote:
On 2007-02-05 23:36:23 +0100, "Nik Coughlin" <nr******@gmail.com>
said:
>François de Dardel wrote:
>>http://dardel.info/Eau.html

What I wanted to achieve was not really complicated: essentially a
left hand column with a 75% width, and a right hand column
containing occasional right-flush picts, plus some stuff filling
the whole horiz space.

You can use display: table, display: table-row and display:
table-cell to make Html elements behave like a table. Unfortunately
IE doesn't support this part of the Css standard, but you can hack
around it with conditional comments. See:

http://nrkn.com/displayTable/

Thanks but if there were no IE life would be easier. I precisely would
like to avoid conditional comments. I found a hack that helps with
widths, I would prefer to avoid a hack. If I wanted to do tables I
would do HTML tables, not mimic their behaviour with CSS.

I have put a version of this page with borders so it is more obvious:
http://dardel.info/test.html
Sorry, I wasn't looking at the bigger picture. Your real problem is that
you're trying to enforce 75% width on the left, in order to leave room for
images on the right, when sometimes 25% of the screen won't be enough for
your widest image (250px).

Instead you should let go of the 75% idea, float the images to the right and
then leave a margin on the left content that's slightly bigger than the
widest image. Example:

http://nrkn.com/floatWidths/
Feb 6 '07 #6
"Nik Coughlin" <nr******@gmail.comwrote:
>CSS tables used to create a layout grid share all of the nasty
drawbacks of HTML tables used to create a layout grid minus the false
semantics (arguably the least important problem).

Would you happen to have any links to resources that explain this in more
detail? Sounds like something I should look into. I don't use display:
table generally, so I've not come across this before.
The issues with table layouts (HTML and CSS) that affect most people:
http://groups.google.com/group/comp....4398e2dac1f5cd

Very few people might experience loss of functionality due to the false
semantics resulting from the use of a HTML table for layout purposes.
Only when a AT speaking browser reads a document in a mode where it
announces table elements can the false semantics cause a (minor)
problem. The use of HTML tables for layout is prevalent on the web, so
its no surprise that no AT speaking browser announces table elements by
default. Table reading mode needs to be activated by the user on a per
case basis.

--
Spartanicus
Feb 6 '07 #7
Scripsit Nik Coughlin:
You can use display: table, display: table-row and display:
table-cell to make Html elements behave like a table. Unfortunately
IE doesn't support this part of the Css standard, but you can hack
around it with conditional comments.
The trick that you illustrate on your page is to use "conditional comments"
(comments of a special format recognized as directives by IE) to throw in
pieces of HTML markup for a table. I wonder how that is supposed to help
with formatting without tables, which was the original intent, if I am not
mistaken. If you are willing to use table markup, why don't you simply use
it the normal way? Much simpler.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Feb 6 '07 #8
On 5 Feb, 22:36, "Nik Coughlin" <nrkn....@gmail.comwrote:
Unfortunately IE doesn't support
this part of the Css standard, but you can hack around it with conditional
comments. See:
Very clever. If that's ever the answer, I don't want to know what the
question is.

Feb 6 '07 #9
On 5 Feb, 21:05, François de Dardel <dardel...@noos.frwrote:
If anybody has a way to make it better, I'd be immensely grateful.
So you have a layout that works, but IE is broken. This is typical
behaviour for the web.

To start fixing it, do the following.

* Use valid HTML
* Use HTML 4.01 Strict, so as to switch IE into standards rendering,
not quirks
* Avoid 1990's <tablemarkup, pixel-based dimensions, mixes of HTML
3.2 attributes and CSS

If you do all three of these, then you've solved almost every IE
inconsistency. The few remaining ones can generally be ignored as
trivial or avoided by not using particular features. For a very few of
them (IMHO there's only one, that of default font size) then use IE
conditional comments in the CSS.

Don't use "hacks" to work around IE's errors (IMHO). They're unstable
with future versions of IE and people who use IE should learn to
accept that it's broken, we shouldn't pander to them.

However, I am seriously considering to return to the table layouts that
I used a few years ago. There are less surprises to expect.
"I can't make CSS work, therefore <tablemust be better and you
people are all fools for telling me otherwise"
Enjoy.

Feb 6 '07 #10
On 2007-02-06 16:45:15 +0100, "Jukka K. Korpela" <jk******@cs.tut.fisaid:
Scripsit Nik Coughlin:
>You can use display: table, display: table-row and display:
table-cell to make Html elements behave like a table. Unfortunately
IE doesn't support this part of the Css standard, but you can hack
around it with conditional comments.

The trick that you illustrate on your page is to use "conditional
comments" (comments of a special format recognized as directives by IE)
to throw in pieces of HTML markup for a table. I wonder how that is
supposed to help with formatting without tables, which was the original
intent, if I am not mistaken. If you are willing to use table markup,
why don't you simply use it the normal way? Much simpler.
Thanks Jukka. Your comments are soothing: I tried to manage everything
with DIVs, but in view of what I want to achieve, and the mess that is
resulting in different versions of different browsers, tables are
indeed simpler. It's just that I was brainwashed with the motto "tables
are evil"...

I will start again with tables. Thanks to everybody.

--
François de Dardel
http://dardel.info/
Faber est suae quisque fortunae
Enlever le quatorze pour m'écrire
Remove fourteen in the address to send mail

Feb 6 '07 #11
On 2007-02-06 17:37:03 +0100, "Andy Dingley" <di*****@codesmiths.comsaid:
On 5 Feb, 21:05, François de Dardel <dardel...@noos.frwrote:
>If anybody has a way to make it better, I'd be immensely grateful.

So you have a layout that works, but IE is broken. This is typical
behaviour for the web.

To start fixing it, do the following.

* Use valid HTML
The page passed the W3 validation test except for the "embed midi" bit
that I know is not valid, but works as I want it to work.
* Use HTML 4.01 Strict, so as to switch IE into standards rendering,
not quirks
Just tested that: it does not help the IE rendering.
* Avoid 1990's <tablemarkup, pixel-based dimensions, mixes of HTML
3.2 attributes and CSS
I have no pixel based dimensions except for some small padding or margins.
>However, I am seriously considering to return to the table layouts that
I used a few years ago. There are less surprises to expect.

"I can't make CSS work, therefore <tablemust be better and you
people are all fools for telling me otherwise"
Enjoy.
I don't think I was arrogant in my initial query. I would love you guys
to tell me the way to obtain resonably similar results in say IE (Mac),
IE (PC) and Safari. It seems that using the basic CSS tools this can't
be achieved. There are quite a lot of pages that tell you to do this or
that trick to "workaround" the problems. Frankly, I prefer to keep
things simple. I am accepting gratefully every useful piece of advice
here, and I have learnt a lot from this forum and from c.i.w.a.

Will still have to try Nik Coughlin's recommendation before turning to
tables...

Thanks again

--
François de Dardel
http://dardel.info/
Faber est suae quisque fortunae
Enlever le quatorze pour m'écrire
Remove fourteen in the address to send mail

Feb 6 '07 #12
Scripsit François de Dardel:
I tried to manage
everything with DIVs, but in view of what I want to achieve, and the
mess that is resulting in different versions of different browsers,
tables are indeed simpler.
I'm not convinced of the necessity to move away from DIVs and pure CSS
layout, but I can understand your feelings. In practice, using _simple_
layout tables - such as a two-cell table to create a simple two-column
appearance, or something a little more complicated - is virtually harmless.

Troubles emerge if you start settings widths in pixels, but you can do that
with CSS just as well, and many people do. Besides, when you use a table,
the cell widths are suggested minimum widths, by definition and by browser
practice, so you get something more flexible than with CSS. (In CSS, you can
set minimum-width, but IE 6 doesn't support it.)

So I think it's quite feasible to set up the basic layout grid using a
simple table but then use CSS to style it, including widths, heights,
backgrounds etc.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Feb 6 '07 #13
On 2007-02-06 19:21:21 +0100, "Jukka K. Korpela" <jk******@cs.tut.fisaid:
Scripsit François de Dardel:
>I tried to manage
everything with DIVs, but in view of what I want to achieve, and the
mess that is resulting in different versions of different browsers,
tables are indeed simpler.

I'm not convinced of the necessity to move away from DIVs and pure CSS
layout, but I can understand your feelings. In practice, using _simple_
layout tables - such as a two-cell table to create a simple two-column
appearance
So I think it's quite feasible to set up the basic layout grid using a
simple table but then use CSS to style it, including widths, heights,
backgrounds etc.
Yes, this is also my basic thinking.
However in the present case the idea given by Nik Goughlin seems to
work well, is simpler than my initial design and does not require
tables. The mess I have created yesterday was apparently related to
trying to fix DIV widths in percent.

Thanks to both of you
--
François de Dardel
http://dardel.info/
Faber est suae quisque fortunae
Enlever le quatorze pour m'écrire
Remove fourteen in the address to send mail

Feb 6 '07 #14
Andy Dingley wrote:
* Avoid 1990's <tablemarkup, pixel-based dimensions,
Pixel-based dimensions are entirely appropriate when allocating space for
images.
Feb 6 '07 #15
I'm trying to catch up on CSS and I could use a little help.

Can someone explain the following;

content: ".";
visibility: hidden;
display: block;
height: 0;
clear: both;
}
..compact>p
{
margin-right: 1ex;
margin-bottom: 0;
padding: 0;
}
I understand everything except "."; and compact>p

What does .compact>p and content: "." mean? And why isn't contact:
written as .content?

Specifically, and "."

Also, the following;
#testelem1 div+div{clear: right}
#testelem1 *:first-child{direction:rtl}
#testelem1 *:last-child{direction:rtl}

What does div+div do?

And #testelem1 *:first-child{direction:rtl}

Specifically,
*: and
{direction:rtl}

Pat
Feb 6 '07 #16
Rik
zzpat <zz*******@gmail.comwrote:
I'm trying to catch up on CSS and I could use a little help.

Can someone explain the following;

content: ".";
visibility: hidden;
display: block;
height: 0;
clear: both;
}
.compact>p
{
margin-right: 1ex;
margin-bottom: 0;
padding: 0;
}
I understand everything except ".";
Well, simplified:

content: '.';
Sets the content of an element you did not mention to '.'.
and compact>p
p if _direct_ child of compact, not just a descendant.

Also, the following;
#testelem1 div+div{clear: right}
a div directly after a div (adjacent) in element with id 'testelem1'
clears all floats to the right of it.
#testelem1 *:first-child{direction:rtl}
Every first child (first element) of every element in element with id
'testelem1' has the text direction from right to left (usually this is for
languages that are indeed read (and written) right to left, this
implementation seems just silly...)
#testelem1 *:last-child{direction:rtl}
Every last child (last element) of every element in element with id
'testelem1' etc...

--
Rik Wasmus
Feb 6 '07 #17
Rik wrote:
>.compact>p
{
margin-right: 1ex;
margin-bottom: 0;
padding: 0;
}
>
p if _direct_ child of compact, not just a descendant.

Thanks. Can you give me an example of how the above would be used?

Feb 7 '07 #18
Rik wrote:
>
>#testelem1 *:first-child{direction:rtl}

Every first child (first element) of every element in element with id
'testelem1' has the text direction from right to left (usually this is
for languages that are indeed read (and written) right to left, this
implementation seems just silly...)

If text were scrolling from right to left wouldn't this be useful or am
I missing it completely?
Feb 7 '07 #19
Rik
zzpat <zz*******@gmail.comwrote:
Rik wrote:
>>
>>#testelem1 *:first-child{direction:rtl}
Every first child (first element) of every element in element with id
'testelem1' has the text direction from right to left (usually this is
for languages that are indeed read (and written) right to left, this
implementation seems just silly...)


If text were scrolling from right to left wouldn't this be useful or am
I missing it completely?

No, not scrolling.

.tfel ot thgir nettirw segaugnal rof s'tI

For instance, often the bullets of ordered lists will appear on the right
hand side instead of the left, align will default to right etc.
--
Rik Wasmus
Feb 7 '07 #20
Rik
zzpat <zz*******@gmail.comwrote:
Rik wrote:
>>.compact>p
{
margin-right: 1ex;
margin-bottom: 0;
padding: 0;
}
> p if _direct_ child of compact, not just a descendant.

Thanks. Can you give me an example of how the above would be used?
..compact p { color:green;}

<div class="compact">
<pthis is green text</p>
<div>
<p>This isn't.</p>
</div>
</div>

A usefull purpose is for instance to avoid compound margins and/or padding
where you don't want it. Not supported by MSIE 6 I thought.
--
Rik Wasmus
Feb 7 '07 #21
Rik wrote:
zzpat <zz*******@gmail.comwrote:
>Rik wrote:
>>>.compact>p
{
margin-right: 1ex;
margin-bottom: 0;
padding: 0;
}
>> p if _direct_ child of compact, not just a descendant.

Thanks. Can you give me an example of how the above would be used?

.compact p { color:green;}

<div class="compact">
<pthis is green text</p>
<div>
<p>This isn't.</p>
</div>
</div>

A usefull purpose is for instance to avoid compound margins and/or
padding where you don't want it. Not supported by MSIE 6 I thought.
--Rik Wasmus
Interesting!

It doesn't work in IE 6. I'll have to toy around with this one before I
get it.
..compact p { color:green;}
span {color : red}

<div style="color : purple">
<p>purple??</p>
<div class="compact">
<div>one more time</div>
<pthis is green text</p>
<p>test</p>
<span>red text</span>
<div>
<p>This isn't green or red??</p>
</div>
</div>
</div>

....got it! I think.

Thanks.
Feb 7 '07 #22
François de Dardel <da*******@noos.frwrites:
I don't think I was arrogant in my initial query. I would love you
guys to tell me the way to obtain resonably similar results in say IE
(Mac), IE (PC) and Safari.
Well, for one thing, forget about IE/Mac. It's hopelessly outdated and no
longer supported or updated by MS. The Mac world is focused on Safari and
FireFox.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Feb 7 '07 #23
In article <m2************@Sherm-Pendleys-Computer.local>,
Sherm Pendley <sp******@dot-app.orgwrote:
François de Dardel <da*******@noos.frwrites:
I don't think I was arrogant in my initial query. I would love you
guys to tell me the way to obtain resonably similar results in say IE
(Mac), IE (PC) and Safari.

Well, for one thing, forget about IE/Mac. It's hopelessly outdated and no
longer supported or updated by MS. The Mac world is focused on Safari and
FireFox.
I'll second that. About the only reason to still be using IE/Mac is
if you have old hardware that will only run MacOS 9 or earlier. Even
then, there are better alternatives to IE that will run on those
systems.
Feb 7 '07 #24
In comp.infosystems.www.authoring.stylesheets message
<eq**********@aioe.org>, Wed, 7 Feb 2007 09:57:47, Nik Coughlin
<nr******@gmail.composted:
>Andy Dingley wrote:
>* Avoid 1990's <tablemarkup, pixel-based dimensions,

Pixel-based dimensions are entirely appropriate when allocating space for
images.
At most, only at present.

Where an image is an encoded bit-map, pixel-based dimensions are
generally appropriate. However, a small picture can be scaled up by an
integer factor without degradation, and it would be possible to arrange
that if the size was given in font units then the picture would be
scaled up accordingly, by the nearest integer. An obviously appropriate
application would be where the picture is actually a picture of text
such as an equation and the user needs ordinary text to be, say, 30pt
where most of us can manage 10pt.

If an image can be transmitted in vector encoding, or in a diagram-
drawing language, it's appropriate to dimension it in font units - the
author can determine that the width of the diagram needs to be so many
ems of the reader's preferred font size.

In my current work, the diagrams are readily determined by javascript
calculations; I just need the elementary graph-plotting primitives for
circle, line, positioned text, and position-plotting symbols.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Feb 7 '07 #25

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

Similar topics

13
2473
by: Adie | last post by:
Hi, is this not possible? public DataSet getDimensions() { } public SqlDataReader getDimensions() { }
2
1420
by: Todd | last post by:
I am desperately trying to figure out the following problem, simplified for discussion. I have a WinForm with a button, textbox, and datagrid. When I click the button, I want to execute the...
3
3699
by: Alpha | last post by:
Hi, I have a window C# application. I update the dataset when user finished entering in a text box. But when I want to update the database when OK is pressed, the...
4
3831
by: Rob | last post by:
Hi, I've been going at this for a few days and can't see the problem. Does anyone see a problem with this code? I have a call to a function that returns a dataset and when I assign values to...
2
2297
by: me | last post by:
I have written a query that joins four or five tables. One table has 30,000 rows. Another table has only 200. I want to only return the 200 or so rows in the smaller table and columns from the...
1
1378
by: prileep | last post by:
I have two tables Users and UserLogin. Here i will use two methods of table design. and which query will return me the result more fast. The table size will be large that it may contain records in...
2
1576
by: prileep | last post by:
I have two tables Users and UserLogin. Here i will use two methods of table design. and which query will return me the result more fast. The table size will be large that it may contain records in...
3
4276
by: =?Utf-8?B?SlA=?= | last post by:
Explanation: We have several SP that need to retrieve a single "Default Photo" from one of several Photo tables. The column in question in these tables is defined as an IMAGE data type. I...
4
2208
by: nanabuch | last post by:
Hello, I am new to this forum, and I am a newbit in Oracle, I do have a background in MS Access, VBA, SQL server development and some Oracle backend development work. I have been giving a task...
0
7114
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
7321
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,...
1
7034
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
7488
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
5623
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
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
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 ...
0
412
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...

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.