New home page

Nick Sabalausky a at a.a
Wed Oct 6 19:26:17 PDT 2010


"Stephan Soller" <stephan.soller at helionweb.de> wrote in message 
news:i8i10k$2a86$1 at digitalmars.com...
> On 06.10.2010 02:08, Arlo White wrote:
>> That's because HTML/CSS is a pretty terrible language for anything
>> beyond simple layouts. It shares more with Word/PDF/PostScript in terms
>> of its purpose and history than it does with real gui layout engines
>> (GTK, QT, etc).
>>
>
> HTML/CSS is primary made for documents not applications.

So true. That, combined with HTTP's stateless nature (and the exploit-prone 
nature of trying to build state on top of it), is why I view "web as a 
platform" as being little different from using PDF as an application 
platform. Heck, the PDF spec is so open-ended it could certainly be done.

> If you want you can simply make every element a block level element and 
> use JavaScript for layout. I don't know GTK and QT in depth but then you 
> should have about the same level of possibilities as with these layout 
> engines. It wouldn't surprise me if GUI frameworks like jQuery UI actually 
> do this.

Heh, layouts that magically break with JS off. Fun :)

I bet you're right though that something like that is out there on the web 
(or will be coming).

You know what's even weirder, though? (And I hope on not veering too far 
offtopic with this...) I've actually some across pages that will load 
perfectly fine with JS off, and *then* two seconds after loading it will be 
automatically replaced with a different page that says "This site doesn't 
work without JS." Ummm, yea, it obviously *did* work...I *saw* it work...

>
> You can do quite a lot of stuff with the "position" property. As soon as 
> you defined something as "position: absolute" you can move it around as 
> you want. How well that (and other techniques) work depends on your HTML 
> structure. However I have to agree that in most practical cases you have 
> to modify the HTML in any way because the document structure changes.
>

Unfortunately, as soon as you start using "position: absolute", you usually 
start causing problems for resize behavior. Unless you're using a 
static-width layout which is generally considered bad style (for good 
reason).

That's one thing I've noticed about CSS layouts that I think a lot of web 
developers tend to overlook. You generally *can* get what you want with CSS 
as long as you assume page width is always the same. But once you decide 
"web pages should be dynamic width" and try to make it look correct at 
different widths, that's when CSS *really* starts to break down. Tables tend 
to resize far better, and give you far better control over resize behavior.

For instance, try to make a resizable box with bit-mapped borders that 
behaves reliably (I've needed to do a lot of that for a client recently). 
Easy as pie with tables and CSS background images. But with anything else in 
CSS, I've become convinced it's just not possible.




More information about the Digitalmars-d-announce mailing list