473,466 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Placing IMG flush to each other

I was curious about something.

In the same table cell I can say this:

<A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"
border="0"></A>

<A HREF="help.pl" ><IMG SRC="help.jpg" width="95" height="35"
border="0"></A>

And the out will have the two images flush to each other (their sides are
flush).

But if I add a <br> in between the two, the two images are not flush (tops
and bottom).

Is there a way to make them flush top and bottom?

Oh, and my table does have borders and cellpadding set to 0.

Thanks ahead!

Daniel
Apr 9 '06 #1
12 2903
Daniel Kaplan wrote:

In the same table cell I can say this:

<A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"
border="0"></A>
<A HREF="help.pl" ><IMG SRC="help.jpg" width="95" height="35"
border="0"></A>

And the out will have the two images flush to each other (their sides are
flush).

But if I add a <br> in between the two, the two images are not flush (tops
and bottom).

Is there a way to make them flush top and bottom?

img { vertical-align:bottom; }

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Apr 9 '06 #2
To further the education of mankind, "Daniel Kaplan" <No****@NoSpam.com>
declaimed:
I was curious about something.

In the same table cell I can say this:

<A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"
border="0"></A>

<A HREF="help.pl" ><IMG SRC="help.jpg" width="95" height="35"
border="0"></A>

And the out will have the two images flush to each other (their sides
are flush).

But if I add a <br> in between the two, the two images are not flush
(tops and bottom).

Is there a way to make them flush top and bottom?


Of course they're not flush - you're adding the html equivalent of a
linefeed between them. Remove the <br>.

--
Neredbojias
Infinity can have limits.
Apr 9 '06 #3
To further the education of mankind, "Daniel Kaplan" <No****@NoSpam.com>
declaimed:
I was curious about something.

In the same table cell I can say this:

<A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"
border="0"></A>

<A HREF="help.pl" ><IMG SRC="help.jpg" width="95" height="35"
border="0"></A>

And the out will have the two images flush to each other (their sides
are flush).

But if I add a <br> in between the two, the two images are not flush
(tops and bottom).

Is there a way to make them flush top and bottom?

Oh, and my table does have borders and cellpadding set to 0.


Oh, I assume you mean flush top-to-bottom. This is probably a white-space
issue. Google for "white-space images".

--
Neredbojias
Infinity can have limits.
Apr 9 '06 #4
"Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote in
message news:Xn**********************************@208.49.8 0.251...
Of course they're not flush - you're adding the html equivalent of a
linefeed between them. Remove the <br>.


right, i want one on TOP of the other...but flush on top
Apr 9 '06 #5
To further the education of mankind, "Daniel Kaplan" <No****@NoSpam.com>
declaimed:
"Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html>
wrote in message
news:Xn**********************************@208.49.8 0.251...
Of course they're not flush - you're adding the html equivalent of a
linefeed between them. Remove the <br>.


right, i want one on TOP of the other...but flush on top


Yeah, I tried to cancel that mess. after re-reading your original post.
It's surely a white-space problem, although you could try placing each
image in a separate <div> instead of using <br>. Btw, why did you reply to
this and not the other message?

--
Neredbojias
Infinity can have limits.
Apr 10 '06 #6
Neredbojias wrote:

Is there a way to make them flush top and bottom?


Of course they're not flush - you're adding the html equivalent of a
linefeed between them. Remove the <br>.

And that does not matter for margin or padding. <br> only adds a line
break, no spacing. <img> is an inline element that follows the rules for
text; it allows space below the image for descenders.
Extra space can show between images on the same line because of a
textual newline in the code. Newlines are treated as whitespace so a space
is inserted between the images. To prevent the space have all of the image
code all on one line of text.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Apr 10 '06 #7
"Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html> wrote in
message news:Xn**********************************@208.49.8 0.251...
Yeah, I tried to cancel that mess. after re-reading your original post.
It's surely a white-space problem, although you could try placing each
image in a separate <div> instead of using <br>.

img { vertical-align:bottom; } worked.
Btw, why did you reply to
this and not the other message?


My news server sucks, I got this one first, the other didn't appear for a
while later.
Apr 10 '06 #8

"Jim Moe" <jm***************@sohnen-moe.com> wrote in message
news:0Y******************************@giganews.com ...
Daniel Kaplan wrote:
img { vertical-align:bottom; }


thanks, this appears to do the trick, yet am confused as to why. The
googling I did came up with this:

"The vertical-align property in CSS has given gray hair to many a starting
css coder until they finally realized what this property is, and what it is
not." Which right about now is on the money ;-)

Thanks again
Apr 10 '06 #9
To further the education of mankind, "Daniel Kaplan" <No****@NoSpam.com>
declaimed:
"Neredbojias" <http://www.neredbojias.com/fliam.php?cat=alt.html>
wrote in message
news:Xn**********************************@208.49.8 0.251...
Yeah, I tried to cancel that mess. after re-reading your original
post. It's surely a white-space problem, although you could try
placing each image in a separate <div> instead of using <br>.

img { vertical-align:bottom; } worked.


Yes, that surprised me and suggests you _didn't_ have a white-space
problem.
Btw, why did you reply to
this and not the other message?


My news server sucks, I got this one first, the other didn't appear
for a while later.


Hehe, I should've guessed. Same thing happens to me occasionally.

--
Neredbojias
Infinity can have limits.
Apr 10 '06 #10
To further the education of mankind, Jim Moe
<jm***************@sohnen-moe.com> declaimed:
Neredbojias wrote:

Is there a way to make them flush top and bottom?


Of course they're not flush - you're adding the html equivalent of a
linefeed between them. Remove the <br>.

And that does not matter for margin or padding. <br> only adds a
line
break, no spacing. <img> is an inline element that follows the rules
for text; it allows space below the image for descenders.
Extra space can show between images on the same line because of a
textual newline in the code. Newlines are treated as whitespace so a
space is inserted between the images. To prevent the space have all of
the image code all on one line of text.


Yes, that is the problem with which I was more familiar. Never tried
"vertical-align:bottom" but I never experienced the OP's problem per se.
What I do do is set "line-height:0px;font-size:0;" en container to sort of
equalize vertical image spacing inter-browserwise.

--
Neredbojias
Infinity can have limits.
Apr 10 '06 #11
add a negative magin to the top of the bottom image.

<A HREF="menu.pl" ><IMG SRC="menu.jpg" width="95" height="35"
border="0"></A> <br>
<A HREF="help.pl" ><IMG SRC="help.jpg" width="95" height="35"
border="0" style-"margin-top:-1em;"></A>

adjust this to whatever size you need.
style-"margin-top:-1em;"

that is just one of several ways to accomplish that.

Apr 10 '06 #12
Daniel Kaplan wrote:
img { vertical-align:bottom; }


thanks, this appears to do the trick, yet am confused as to why.

See my reply to Neredbojias.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Apr 10 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel | last post by:
System.IO.StreamWriter Close or Flush method to shut down the computer in such a way that just part of the file is written? or an empty file is written? Also if the Close or Flush is to a...
30
by: Jonathan Neill | last post by:
I'm aware that there is no ANSI (or POSIX, or any standard, to my knowledge) way of flushing stdin or any other application-level input buffer, but if anyone knows a hack or a non-portable way to...
4
by: Johnathan Doe | last post by:
I'm trying to find a way to reliably peek at stdin, and if anything's waiting, flush stdin so that it clears the stream ready to wait for a character. The problem I have is that in an...
25
by: JeffS | last post by:
Honest, I scoured the comp.lang.c.faq for this but found nothing. :) Is there a library function for placing the cursor position in the console? Or is it something that can only be done with a...
5
by: Luiz Vianna | last post by:
Guys, I need to send some info to my client while I'm processing some stuff. The flow will be something like : -process -response -process -response .... I imagine to use response.flush...
1
by: Brian | last post by:
I'm trying to execute a DTS package through an ASP.Net web page. I want it to output the successful completion of each step. I have pasted my code below. It executes and output what I want, but...
1
by: nitroamos | last post by:
i'm working on improving the IO for the software project i'm working on to do two extra things. first, i'm going to add HDF5 functionality, and second, add the ability to write binary output. the...
7
by: Michael Galvin | last post by:
I am trying to use Python to send to the printer a calender filled with a mix of text and simple graphics. I want to draw on the printed page something like a table with 6 rows and 7 columns to...
7
by: shwetu | last post by:
If i place vb and cs class files together in App_Code in asp.net 2.0 i get error that i can't place as they us a different language which is not allowed as they have to be complied together. Is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.