HTML for KMail [Re: khtml and table widths]

Vadim Plessky lucy-ples at mtu-net.ru
Thu Jul 18 13:17:25 BST 2002


On Thursday 18 July 2002 3:52 pm, Martijn Klingens wrote:
|  On Thursday 18 July 2002 13:41, Vadim Plessky wrote:
|  > Can you please confirm that you expect behavior (rendering) like in
|  > corrected example (attached)
|  > In you variant, table was taking only 30% of the screen (not 100%)
|
|  Sure, that's layouting, that's not important at all if you want to convert
| the *structure* of the code! :-)

ok, please see attached example.
Renders identically in my Konq 3.0.2 and Mozilla 1.0

Code inline:
<html>
<head><title> html for KMail - only DIVs! </title>
<style type="text/css">
  #header { border: 1px solid navy; width: 100% }
  .left { width: 4em; float: left;  }
</style>
<body>
<div id="header">

<div id="from">
  <div class="left">From:</div>
  My name and email address
</div>

<div id="to">
  <div class="left">To:</div>
  Your name and email address
</div>

<div id="date">
 <div class="left">Date:</div>
  Some date
</div>

</div>
</body>
</html>

Note that is' almost pure XML.
Just replace
<div id="from">
  <div class="left">From:</div>
  My name and email address
</div>
with
<from>
  <deco>From:<deco>
  My name and email address
</from>
and you are at XML land.  :-)
Any specific reaosn why KMail uses HTML, not XML, for layout?...

|
|  I deliberately didn't add any layout, as I already explained in my mail.
|
|  Also, you just gave the left column a fixed width of 4em, which I don't
| really like. HTML width should work like Qt's QSizePolicy, because the left
| column should be 'Minimum' width and the right column should expand to fill
| the remaining space, whatever size that may be.

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.

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

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020718/fb4ad6cc/attachment.html>


More information about the kfm-devel mailing list