Mozilla vs IE spacing

R

Ron Croonenberg

Hello,

Not exactly a javascript question (but I need to make the changes with a
javascript)

I need to put a few buttons ona row next to each other with no space in
between (horizontally and vertically).

When I set the margin to 0px (in the body/document) it works in IE
however it doesn't in firefox.

How can I put a button in an 'exact' location, for basically any browser.

thanks,

Ron
 
V

VK

Hello,

Not exactly a javascript question (but I need to make the changes with a
javascript)

I need to put a few buttons ona row next to each other with no space in
between (horizontally and vertically).

When I set the margin to 0px (in the body/document) it works in IE
however it doesn't in firefox.

How can I put a button in an 'exact' location, for basically any browser.

You need to use phantom node protected pretty print then:

<!-- bad -->
<div>
<input type="button" value="action 1">
<input type="button" value="action 1">
<input type="button" value="action 1">
</div>
 
T

Thomas 'PointedEars' Lahn

VK said:
You need to use phantom node protected pretty print then:

There is no such thing as a "phantom node"; that is merely a byproduct of
your vivid imagination.
<!-- bad -->
<div>
<input type="button" value="action 1">
<input type="button" value="action 1">
<input type="button" value="action 1">
</div>

It is _not_ bad, it is simply unsuitable here because whitespace creates
text nodes that are uniformly rendered like a single space (in compliance
with the HTML 4.01 Specification, section 9.1):

http://www.w3.org/TR/html4/struct/text.html#whitespace

Those text nodes are not uniformly normalized (read: removed) in DOMs which
lead to your misinterpretation that the Gecko DOM would insert "phantom
nodes" and MSHTML does not where the exact opposite is true (MSHTML removes
some whitespace text nodes from the document tree and leaves others in).
This has been explained to you in detail several times already; here, and in
Wikipedia where your misguided unencyclopedic article was eventually
removed. To insist that there are "phantom nodes" anyway eventually marks
you as being the incompetent ignorant that you are continuously displaying
yourself as, in technical discussions.


PointedEars
 
R

Ron Croonenberg

Uhm, ok...

I built a table and stuck each individual button in a cell. That
worked. (a but much work to just keep them 'in place' though
 
T

Thomas 'PointedEars' Lahn

Ron said:
I built a table and stuck each individual button in a cell.

That is even worse. A table is a table is a table. [psf 3.8]
That worked. (a but much work to just keep them 'in place' though

Please observe that despite VK's reputation the solution presented by
them is best and does work in this case; however, like a confirmation of
their reputation, the explanation of the problem and its solution was
utterly wrong, so it had to be criticized and corrected.

Please trim your quotes, and do not top-post.


PointedEars
 
T

The Magpie

VK said:
Hello,

Not exactly a javascript question (but I need to make the changes with a
javascript)

I need to put a few buttons ona row next to each other with no space in
between (horizontally and vertically).
[snip]

You need to use phantom node protected pretty print then:

<!-- bad -->
<div>
<input type="button" value="action 1">
[snip]
</div>

<input type="button" value="action 1" [snip]
</div>
I think your imagination may be working overtime - this "phantom node"
and "protected pretty print" appear to be something of your own. What
you are looking at in example 1 is an empty text node (which takes up
a space, as it should) and a different way of typing the same thing.
It still has an empty node, but since it has no linefeed or carriage
return may not include a space. To be honest, I can't be bothered
checking - but typing the lot on the same line should do the job just
as well.
 
T

Thomas 'PointedEars' Lahn

The said:
VK said:
Not exactly a javascript question (but I need to make the changes
with a javascript)

I need to put a few buttons ona row next to each other with no space
in between (horizontally and vertically). [snip]
You need to use phantom node protected pretty print then:

<!-- bad --> <div> <input type="button" value="action 1"> [snip] </div>


<input type="button" value="action 1" [snip]
</div>
I think your imagination may be working overtime - this "phantom node"
and "protected pretty print" appear to be something of your own. What you
are looking at in example 1 is an empty text node (which takes up a
space, as it should)

Whitespace is not and whitespace nodes are not empty by defintion.
and a different way of typing the same thing. It still has an empty node,

Not at all.
but since it has no linefeed or carriage return may not include a space.

There is no node, but more important there is no whitespace anymore, then.
To be honest, I can't be bothered checking - but typing the lot on the
same line should do the job just as well.

It would do the job, however it may exceed column 80 which makes it harder
to maintain.


PointedEars
 
R

Ron Croonenberg

Wow, that is pretty arrogant, not to mention the liberty you take
calling people names (which always make me laugh when I try to imagine
the circumstances under which such language comes to the writers mind).

I have seen several people on here (this group) behave as if they are an
authority in the field, however I fail to see them mentioned in any
publication or affiliation of ANY significance. There probably isn't any.

Let's face it, most of us are here to simply exchange some tips and
tricks because major browser developers still didn't get it right and
most of the oddities are poorly documented, if at all. That is how
usenet always has been used, quick question and answer threads.

Of course there are always the self proclaimed geniuses that rather act
like a jerk instead of giving the quick answer.

Sorry for top posting again... :)

On Thu, 27 Mar 2008 12:24:13 -0400, Ron Croonenberg wrote:

[in regards to posting style]
why ? is there an nntp fashion police nowadays ?

No, there are no fashion police.

However, EVERY group of people have its own ways and customs. If you
want to get along with that group, you will follow those customs.

There is no law that says you can't top-post. By the same token, there
is no law that says we [collective or individual] can't decide that
someone is a top-posting, over-quoting idiot that is best ignored.
 
I

Ivan Marsh

why ? is there an nntp fashion police nowadays ?

No... but there has been an nntp posting etiquette RFC for the past twenty
years.

Follow it or you will end up in stupid conversations like this one.


Top-posting fixed.
 
R

Richard Cornford

Ron said:
Wow, that is pretty arrogant, not to mention the liberty
you take calling people names

Nobody has been calling you names. It has just been observed that
disregarding the long established (and documented) posting conventions
of the group may result in your being regarded a "top-posting,
over-quoting idiot that is best ignored", and that is a statement of
fact.

I have seen several people on here (this group) behave
as if they are an authority in the field, however I fail
to see them mentioned in any publication or affiliation
of ANY significance. There probably isn't any.

I seem to get mentioned in publications quite often, but invariably by
the wrong name to date, which says more about the quality of those
publications (specifically their author's ability to do research
effectively) than anything else.
Let's face it, most of us are here to simply exchange
some tips and tricks ...

No "we" are not. For a start, "tips and tricks" (read: 'half ass hacks')
is the wrong approach to browser scripting.

Of course there are always the self proclaimed geniuses that
rather act like a jerk instead of giving the quick answer.

Sorry for top posting again... :)

Top posting is a voluntary action that you could have avoided, so saying
"sorry" is unlikely to change anything.

Richard.
 
T

Thomas 'PointedEars' Lahn

Ron said:
Wow, that is pretty arrogant,

Roesen's Law. You lose.
not to mention the liberty you take calling people names (which always
make me laugh when I try to imagine the circumstances under which such
language comes to the writers mind).

I have seen several people on here (this group) behave as if they are an
authority in the field, however I fail to see them mentioned in any
publication or affiliation of ANY significance. There probably isn't any.

Let's face it, most of us are here to simply exchange some tips and
tricks because major browser developers still didn't get it right and
most of the oddities are poorly documented, if at all. That is how usenet
always has been used, quick question and answer threads.

Spoken like a script-kiddie. YMMD.
Of course there are always the self proclaimed geniuses that rather act
like a jerk instead of giving the quick answer.

The quick answer seldom is a good one.
Sorry for top posting again... :)

[top post]

*PLONK*

Please do not feed the troll.


F'up2 set
 
T

The Magpie

Thomas said:
Whitespace is not and whitespace nodes are not empty by defintion.
Many thanks, Pointed. As I mentioned, it isn't something I am
particularly sure of and you cleared it up for me. To be honest, I
sort of just expect the whitespace and deal with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top