Re: No TABLES in html. No hacks in CSS. Any layout possible, crossbrowser. Try it.



brave1979 wrote:

Using javascript for layout.... terrible idea. And hardly
crossbrowser.

Really? How do you call a thing that works in IE, Firefox, Opera,
Safari and Konqueror then ?

Disable JavaScript, like ~10% of your visitors, and look at your
page again. Not everyone has it enabled, or available - stripped by
a corporate firewall, for example - so your method has similar
results to turning off your web server for a month every year.

Can you show me some hard data backing up your claim that 10% of
visitors do not have Javascript enabled? Even for such people all
content is still readable and if you really care you can provide them
with something easy on eyes.

http://www.w3schools.com/browsers/browsers_stats.asp
varies between 6-12% over the last few years. Note I said *~* 10%. That
means circa 10%. There are other stat sites which you can probably find
via Google.

I would have expected you to have at least a link to a demonstration
page at the link you mentioned.

...and do you have one of these?

You say, "You just need to write something like this!"
but it is a *lot* easier just to write regular old HTML than your
script, with its errors. A *lot* easier.

This is very simple example. True strength of my approach is ability
to nest layouts, and ability to change them as requirements change.

What kind of "nesting" would I want to do? Nest tables?

You also say, "HTML is horrible. It's not suitable for anything more
visually complicated than a short school essay. " You must be new to
this game. HTML and CSS can do much more than you seem to realize.

Actually I'm pretty old to this game and tired from countless
occasions when I tried to get something look good and do what I want
in different browsers. I joined this game before such thing as
tableless layout was even possible.

Me too, but that's not an excuse.

And I'll bet the total weight in bytes of a plain HTML/CSS page is quite
a bit less than your convoluted approach.

It's not weight in bytes that matters.

Of *course* it matters! Ever use dial-up?

It's weight in hours of programmer time stolen that matters.

That applies to one person, not thousands of visitors' time. You would
rather churn out pages quickly, then penalize all of the visitors with
bloated pages?

And for more complex layout there should be no significant difference
in size between my approach and css hacking.

CSS hacking? Hacking? You think we need to 'hack'? <g>

More important is that with my lib you can achieve being
crossbrowser almost effortless and your html files and even css
files stay clean hack-free, table-free.

My HTML and CSS files are already "hack-free". You will have to
explain in some detail why you think differently.

Then you are lucky guy, browsing internet tells me not everybody is
as lucky as you. Explain? underscore hack, asterisk hack, .clearfix
... I'm sure you know what I'm talking about.

Oh, you are talking about *authoring* "hacks"... I don't consider good,
semantic HTML or carefully crafted CSS "hacking". I thought you meant
someone - some black hat person - could hack your server files. <shrug>

Your other post:

I'm not using tables in my html, isn't that enough?

No. It is still using "tables for layout", a process we keep stressing
should be avoided.

Could you remind me real quick why this should be avoided?

Read the archives of these groups.

Semantic html, uncluttered html, crossbrowser comes to my mind.

Semantic. How is a column of menu items related to a block of content
adjacent to it? Tables are for data.

My approach has this qualities. Or maybe tables has been declared as
devils spawn by vatican and should be as such?

For layout, yes. The Pope told me.

I keep my html clean and I can order content any way I want. It's
human friendly and robot friendly.

Your sample code is using a Transitional doctype. What are you
transitioning from? That's for legacy pages; use Strict instead.

Maybe you can put browser in quirks mode with strict doctype
declaraion, I haven't tried that yet. It's work in progress.

What?

You assign font size in pixels; that too has gone the way of the dodo
bird. Use percentages instead. See: http://k75s.home.att.net/fontsize.html

This has nothing to do with my lib so you can specify fonts any way
you like while using it. I like pixels for this simple example.

Most of us prefer percentages for font sizing because when the visitor
hits the "upsize" key, the content won't jump out of your pixel-sized
boxes. And IE won't resize, thus annoying your visitors with less than
perfect vision.

Clean code? <lol> See:
<http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.bravelay...>

This page is not Valid XHTML 1.0 Transitional!
Result: Failed validation, 119 Errors

Why do you try to validate it as XHTML if it's indicated as HTML
Transitional in DOCTYPE?
It's valid HTML 4.01 Transitional (after some minor fixes).

Read the validator link again. It's your page .. the link you posted.
Your site. My sites have no errors.

Human friendly, perhaps, to the other 90%.
Robots (search engines?) don't read and execute JavaScript.

And that's good because visual layout of a page is none of their
interest.

So anything in your JavaScript is ignored.

You need to rethink what you are doing.

I am constantly rethinking almost everything I am doing.

That's a good sign.

--
-bts
-Friends don't let friends drive Vista
.



Relevant Pages

  • Re: htmlhelp not referencing stylesheets when called from VB6 applicat
    ... The easy way would be to link the CSS and javascript files into each html ... Also make sure each .html doc has the appropriate DocType ... We are having problems with our merged HTML Help system. ... the CSS and JavaScript ...
    (microsoft.public.vb.general.discussion)
  • Re: How to set the default home page using php code in Firefox
    ... must be of type _URI_, i.e. a URI or URI reference as defined in RFC3986 ... (which obsoletes RFC2396 as referred to by the HTML 4.01 Specification). ... JavaScript when a subset is written in what could be executed as JavaScript. ... Something like this could only be CSS (i.e. be produced ...
    (comp.lang.javascript)
  • Re: Transitioning out of beginning html
    ... I've heard that most websites now are created using javascript, ... One of the few _readable_ tutorials to CSS and it makes a handy ... Best "start here for HTML" book around at present. ... Don't assume browser window sizes. ...
    (comp.infosystems.www.authoring.html)
  • Re: Attaching functions to events, from external JS files
    ... >pre-existing HTML content using JavaScript DOM Level 1. ... >adding this type of contents doesn't require to write hardcoded HTML ... >that Mozilla doesn't support CSS. ... like they disable script. ...
    (comp.lang.javascript)
  • Re: No TABLES in html. No hacks in CSS. Any layout possible, crossbrowser. Try it.
    ... Disable JavaScript, like ~10% of your visitors, and look at your page ... HTML and CSS can do much more than you seem to realize. ... And for more complex layout there should be no significant difference ... transitioning from? ...
    (comp.infosystems.www.authoring.html)