HTML for KMail [Re: khtml and table widths]

Martijn Klingens mklingens at ism.nl
Thu Jul 18 13:34:35 BST 2002


On Thursday 18 July 2002 14:17, Vadim Plessky wrote:
> <style type="text/css">
>   #header { border: 1px solid navy; width: 100% }
>   .left { width: 4em; float: left;  }
            ^^^^^^^^^^^^^^

That's a fixed width, won't look too good if font sizes are different. Suppose 
the translation of 'From' takes 12 characters and 'To' still needs 2 
characters. It's not that hard to come up with a font size where one div is 
expanded to fit the overflow of the 12-char text, but the other div is your 
proposed 4em wide. Needless to say that's several orders of magnitude more 
ugly than using tables...

Trust me, if you want to layout this by structure instead of hardcoded metrics 
this is really a 2x3 matrix, or in KHTML speak: table :-)

> CSS porperties width-min and width-max are not implemented in KHTML (yet),
> AFAIK.
> When available: I can add support you want in one line of code.

I don't want to specify *any* width. I just want to specify the size policy, 
like Qt does. In other words: use the minimum required space to fit the left 
column, independent of font size, screen width and what more, and use the 
rest for the second column. Maybe you can do it by setting the 2nd column's 
width to 100%?

> P.S. Please do not cc: me directly, I am subscribed to the list.
> Just was not posting for a couple of weeks...

Did I cc you???
-- 
Martijn





More information about the kfm-devel mailing list