[erlang-questions] Two beautiful programs - or web programming made easy

Mathias Picker Mathias.Picker@REDACTED
Wed Feb 16 20:46:22 CET 2011


Am Mittwoch, den 16.02.2011, 16:34 +0100 schrieb Joe Armstrong:
> Rich text. I want to do pixel exact typography
> 
> I can make rich text by adding spans and css and stuff in the dom, but
> I
> want pixel accurate
> sizeing of spans - I want to do the following:
> 
> define several on screen divs with absolute size and position. Link
> them in
> some order.
> for example say
> 
> <div id="a" style="absolute:...." next="b">
> <div id="b" ...                            next="c">
> 
> Then given rich text <p><span class="c1">...</span>  I want to flow
> this
> into div a, so that it overflows into div b - I need to pixel exactly
> calculate where to spit the text in order to do this.
> 
> If I could do this I could easily port erlguten to run in a browser
> 
> All these seem like pretty basic things - but I can't seem to find any
> code
> 
> /Joe
> 

>From my understanding there is no such thing as pixel perfect with html.

One important idea behind it (and css) is device independence. A web
site should be readable from my 3.8'' N900 to my 26'' main monitor.

Partly for this reason, with CSS, I'm allowed to put my own user
stylesheet before any site supplied (which, incidentally, I do),
breaking every pixel perfect designs you might try.

HTML is no "rich text" in the sense of RTF, it's simple document markup,
and css gives you some (!) ability to influence the look of it (but
*cascading*, so the user has the last word)

If you need pixel perfect, use a different technology. If you want to do
html & css, accept that the recipient and his device  has the last word,
and you can only hint at what you want.

Cheers, Mathias



More information about the erlang-questions mailing list