HTML for KMail [Re: khtml and table widths]
Vadim Plessky
lucy-ples at mtu-net.ru
Wed Jul 24 13:38:17 BST 2002
On Thursday 18 July 2002 5:35 pm, Martijn Klingens wrote:
| On Thursday 18 July 2002 15:29, Vadim Plessky wrote:
| > It seems my HTML example hasn't impressed you.
| > ok, please take XML than!
| > Ladislav: thanks for original KMail's HTML/CSS, I used some of those
| > definitions in example below.
| >
| > [ ... ]
| >
| > left { display: block; width: 4em; float: left;
|
| ^^^^^^^^^^^^^
| This one won't impress me either as a replacement for a table, because
| again it cannot possibly guarantee that all elements are properly
| positioned in a 2x3 grid. Depending on translations that might break the
| layout horribly...
Checking code on one of C-Net pages, I found following JS example, which can
do the trick if fixed layout (like width: 4em; ) is not o.k.
<!--
var docWidth=0;
if(window.innerWidth)
{ docWidth=document.innerWidth;
}
else if(document.body)
{ docWidth=document.body.clientWidth;
}
if(docWidth<700)
{ document.write("<br clear=\"all\" />");
}
// -->
You can "extract" actual width of document (and its height) using DOM methods
and/or JS bindings, and re-layout document in accordance
--
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/
More information about the kfm-devel
mailing list