HighDots Forums  

Vertical align

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Vertical align in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andreas Prilop
 
Posts: n/a

Default Vertical align - 07-07-2009 , 11:14 AM






In HTML 4 Strict, the elements COL, TBODY, TD, TH, TR
can have the attribute valign. Therefore, I assumed that
I could also use the property vertical-align with them.

In http://www.w3.org/TR/CSS2/sample.html , I read
td, th, tr { vertical-align: inherit }

But Opera ignores TR { vertical-align ... } altogether
whereas Firefox and Internet Explorer inherit the value
to TD and TH.
http://www.user.uni-hannover.de/nhtcapri/temp-4.html

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Vertical align - 07-07-2009 , 05:31 PM






Andreas Prilop wrote:

Quote:
In HTML 4 Strict, the elements COL, TBODY, TD, TH, TR
can have the attribute valign.
For some odd reason, yes. The attribute is rather purely presentational.
(Attributes like align="right" might be described as semi-presentational, as
such an attibute typically means that the cell content is a number.)

Quote:
Therefore, I assumed that
I could also use the property vertical-align with them.
You can use any CSS property for any element, but I presume you expected
some _effect_.

Quote:
In http://www.w3.org/TR/CSS2/sample.html , I read
td, th, tr { vertical-align: inherit }
Technically, it's a "sample style sheet", which purports to being both
descriptive and prescriptive and isn't neither of them.

Quote:
But Opera ignores TR { vertical-align ... } altogether
whereas Firefox and Internet Explorer inherit the value
to TD and TH.
http://www.user.uni-hannover.de/nhtcapri/temp-4.html
It's not a very clear example; I would rather use a simple test like

<style type="text/css">
..top tr { vertical-align: top; }
</style>
Unstyled:
<table border><tr><td>first line<br>second line</td><td>other
cell</td></tr></table>
Styled with tr { vertical-align: top; }
<table border class="top"><tr><td>first line<br>second line</td><td>other
cell</td></tr></table>

Anyway, yes, Opera behaves differently. I cannot classify this as a bug,
though, just as an oddity. I guess we need to conceptually treat Opera as
having a browser default style sheet with
th, td { vertical-align: baseline; }
And is it even odd?

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #3  
Old   
Andreas Prilop
 
Posts: n/a

Default Line height - 07-09-2009 , 11:05 AM



On Wed, 8 Jul 2009, Jukka K. Korpela wrote:

Quote:
http://www.user.uni-hannover.de/nhtcapri/temp-4.html

It's not a very clear example;
Actually, that was supposed to be a test on line height.

So, let's turn to line-height. :-)

Firefox carefully calculates the different line heights.
But Internet Explorer 6 and 7 seem to round rather coarse.
Some columns have the same height in IE. What's worse,
you get other columns with same height when you change
the text size in IE to "larger" oder "smaller". :-(

--
In memoriam Alan J. Flavell
http://groups.google.co.uk/groups/search?q=author:Alan.J.Flavell

Reply With Quote
  #4  
Old   
jeff
 
Posts: n/a

Default Re: Line height - 07-09-2009 , 11:32 AM



Andreas Prilop wrote:
Quote:
On Wed, 8 Jul 2009, Jukka K. Korpela wrote:

http://www.user.uni-hannover.de/nhtcapri/temp-4.html
It's not a very clear example;

Actually, that was supposed to be a test on line height.

So, let's turn to line-height. :-)

Firefox carefully calculates the different line heights.
But Internet Explorer 6 and 7 seem to round rather coarse.
You want stranger, try setting it unitless. eg:

<td style="line-height: 1.30"

The breaks fall in different places, but it appears to be an
improvement overall with steps more evenly distributed and closer to the
Moz rendering.

Tested in IE6.

Jeff



Quote:
Some columns have the same height in IE. What's worse,
you get other columns with same height when you change
the text size in IE to "larger" oder "smaller". :-(

Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: Line height - 07-09-2009 , 07:18 PM



In article
<Pine.LNX.4.64.0907091659100.27373 (AT) sarge (DOT) rrzn.uni-hannover.de>,
Andreas Prilop <prilop4321 (AT) trashmail (DOT) net> wrote:

Quote:
On Wed, 8 Jul 2009, Jukka K. Korpela wrote:

http://www.user.uni-hannover.de/nhtcapri/temp-4.html

It's not a very clear example;

Actually, that was supposed to be a test on line height.

So, let's turn to line-height. :-)

Firefox carefully calculates the different line heights.
But Internet Explorer 6 and 7 seem to round rather coarse.
Some columns have the same height in IE. What's worse,
you get other columns with same height when you change
the text size in IE to "larger" oder "smaller". :-(
Yes, FF is careful. In Mac Safari 3, at some enlargements it is not
quite logical. Nor in Mac iCab or Opera.

--
dorayme

Reply With Quote
  #6  
Old   
dorayme
 
Posts: n/a

Default Re: Line height - 07-09-2009 , 07:28 PM



In article <doraymeRidThis-1EE6B6.09180710072009 (AT) news (DOT) albasani.net>,
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
In article
Pine.LNX.4.64.0907091659100.27373 (A...ni-hannover.de>,
Andreas Prilop <prilop4321 (AT) trashmail (DOT) net> wrote:

On Wed, 8 Jul 2009, Jukka K. Korpela wrote:

http://www.user.uni-hannover.de/nhtcapri/temp-4.html

It's not a very clear example;

Actually, that was supposed to be a test on line height.

So, let's turn to line-height. :-)

Firefox carefully calculates the different line heights.
But Internet Explorer 6 and 7 seem to round rather coarse.
Some columns have the same height in IE. What's worse,
you get other columns with same height when you change
the text size in IE to "larger" oder "smaller". :-(

Yes, FF is careful. In Mac Safari 3, at some enlargements it is not
quite logical. Nor in Mac iCab or Opera.
I forgot to add, importantly, that Mac IE does not understand
line-height: normal and has this curious reaction: it prints the first
000% in the table but not the rest! Ditto 0.00. Removing the CSS
instruction here and letting it default, makes it happy.

--
dorayme

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.