Question regarding IMG attribute 'HSPACE'

B

Bjoern

Hi all.

How can I place button pictures next to each other without a gap between the
two buttons?
I've tried using HSPACE="0", but there is still a discernable gap between
the two.
Does anyone out there know of a different method?

My attempt: <img src="images/button_1.jpg" border="0" align= "absmiddle"
hspace="0">


Thanks in advance,

Bjoern
 
L

Lauri Raittila

Bjoern said:
How can I place button pictures next to each other without a gap between the
two buttons?
URL?

I've tried using HSPACE="0",

Well, that doesn't help anything.
but there is still a discernable gap between the two.
Does anyone out there know of a different method?

Assuming horizonatal gap.
My attempt: <img src="images/button_1.jpg" border="0" align= "absmiddle"
hspace="0">

As usual, you codesnipped was not very useful. URL is best, code snipped
with all relevant information and nothing else is almost as good. Of
course, if you would know what is relevant, you would also know the
answer...

<img ...><img ...>

Not (because white space bug)
<img ...>
<img ...>
nor
<img ...> <img ...>
 
S

Spartanicus

brucie said:
<img> is a start tag.

"a line break immediately following a start tag must be ignored"

Doesn't apply.

"as must a line break immediately before an end tag"

Also doesn't apply.
 
B

brucie

in post:
<
"a line break immediately following a start tag must be ignored"
Doesn't apply.
why?

"as must a line break immediately before an end tag"
Also doesn't apply.

why?
 
M

Mitja

brucie said:
in post:
<


if <img> is not a start tag of the img element then what is it?

I've always thought of <img> as of <img></img> (and similar for <input> et
al.). In a way, it makes sense: the moment you open the tag, you kind of
close it. "Kind of", of course - the terms here must be applied loosely.
AFAIK the XHTML validator (incorrectly) doesn't distinguish between <img/>
and <img></img>. This doesn't mean anything in particular, but shows the
logic behind it all.
But if you look at it the practical way, what one would expect is certainly
the no-whitespace behavior.

So trying to follow the specs as closely as possible, I tend to agree with
Spartanicus, although the matter is far from clear.
 
B

brucie

in post: <
Mitja said:
I've always thought of <img> as of <img></img> (and similar for <input> et
al.).

the closing tags for both those elements are forbidden.
AFAIK the XHTML validator (incorrectly) doesn't distinguish between <img/>
and <img></img>.

because either method is valid
So trying to follow the specs as closely as possible, I tend to agree with
Spartanicus, although the matter is far from clear.

its very clear. if there is a linebreak directly following an opening
tag then it must be ignored. its very simple
 
M

Mitja

brucie said:
in post: <

the closing tags for both those elements are forbidden.


because either method is valid

Thought only the first one was the way to go. Sorry.
its very clear. if there is a linebreak directly following an opening
tag then it must be ignored. its very simple

What doesn't seem clear to me is whether <img> (in html) is an opening tag.
Semantically, if not sytactically, it is the equivalent of xhtml's <img/>.
The way I see it, it means opening _and_ closing the tag at the same time -
that's also why it's called empty.
 
B

brucie

in post: <
Mitja said:
What doesn't seem clear to me is whether <img> (in html) is an opening tag.

Semantically, if not sytactically, it is the equivalent of xhtml's <img/>.
The way I see it, it means opening _and_ closing the tag at the same time
that's also why it's called empty.

it doesn't matter if the element is empty or not. "This applies to all
HTML elements without exception."

i really cant understand why this seems such a hard concept to grasp for
some people. b.3.1 is very clear and simple to understand.
 

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
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top