Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 05:28 PM
Daniel
Guest
 
Posts: n/a
Default Remove space between images

Hi

I'd like to discuss the following problem: How to remove the space
between two images (img)?

<img alt="First" src="first.gif">
<img alt="Second" src="second.gif">

I tried:

<style>
* {
padding: 0;
margin: 0;
border: none;
}
</style>

However, the effect is none. There remains a space between the images.

Anybody resolved this problem?

Thanks in advance.
Daniel Frey
  #2  
Old July 20th, 2005, 05:28 PM
Mark Parnell
Guest
 
Posts: n/a
Default Re: Remove space between images

Sometime around 3 Nov 2003 14:31:13 -0800, Daniel is reported to have
stated:
[color=blue]
> Hi[/color]

G'day.
[color=blue]
>
> I'd like to discuss the following problem: How to remove the space
> between two images (img)?
>
> <img alt="First" src="first.gif">
> <img alt="Second" src="second.gif">
>[/color]

<img alt="First" src="first.gif"><img alt="Second" src="second.gif">

HTH

--
Mark Parnell
http://www.clarkecomputers.com.au
  #3  
Old July 20th, 2005, 05:28 PM
Spartanicus
Guest
 
Posts: n/a
Default Re: Remove space between images

Daniel wrote:
[color=blue]
>I'd like to discuss the following problem: How to remove the space
>between two images (img)?
>
> <img alt="First" src="first.gif">
> <img alt="Second" src="second.gif">[/color]

<img alt="First" src="first.gif"><img alt="Second" src="second.gif">

--
Spartanicus
  #4  
Old July 20th, 2005, 05:28 PM
Find Yourself
Guest
 
Posts: n/a
Default Re: Remove space between images

<img alt="First" src="first.gif" hspace="0" vspace="0" align="left" />
<img alt="Second" src="second.gif" hspace="0" vspace="0" align="left" />

"Daniel" <daniel.frey@switzerland.org> wrote in message
news:24692148.0311031431.58ec4d0a@posting.google.c om...[color=blue]
> Hi
>
> I'd like to discuss the following problem: How to remove the space
> between two images (img)?
>
> <img alt="First" src="first.gif">
> <img alt="Second" src="second.gif">
>
> I tried:
>
> <style>
> * {
> padding: 0;
> margin: 0;
> border: none;
> }
> </style>
>
> However, the effect is none. There remains a space between the images.
>
> Anybody resolved this problem?
>
> Thanks in advance.
> Daniel Frey[/color]


  #5  
Old July 20th, 2005, 05:28 PM
Markus Ernst
Guest
 
Posts: n/a
Default Re: Remove space between images

"Daniel" <daniel.frey@switzerland.org> schrieb im Newsbeitrag
news:24692148.0311031431.58ec4d0a@posting.google.c om...[color=blue]
> Hi
>
> I'd like to discuss the following problem: How to remove the space
> between two images (img)?
>
> <img alt="First" src="first.gif">
> <img alt="Second" src="second.gif">
>
> I tried:
>
> <style>
> * {
> padding: 0;
> margin: 0;
> border: none;
> }
> </style>[/color]

Try this (not tested):

<style>
img {
padding: 0px;
margin: 0px;
display:block;
}
</style>

--
Markus


  #6  
Old July 20th, 2005, 05:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Remove space between images


"Daniel" <daniel.frey@switzerland.org> wrote in message
news:24692148.0311031431.58ec4d0a@posting.google.c om...[color=blue]
> Hi
>
> I'd like to discuss the following problem: How to remove the space
> between two images (img)?
>
> <img alt="First" src="first.gif">
> <img alt="Second" src="second.gif">[/color]

Hint: If you have the following HTML code:

<p>HEL
LO</p>

it would appear as HEL LO in a browser, not as HELLO. If you want HELLO, you
have to have

<p>HELLO</p>

  #7  
Old July 20th, 2005, 05:29 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: Remove space between images

Harlan Messinger wrote:
[color=blue]
> "Daniel" <daniel.frey@switzerland.org> wrote in message
> news:24692148.0311031431.58ec4d0a@posting.google.c om...
>[color=green]
>>Hi
>>
>>I'd like to discuss the following problem: How to remove the space
>>between two images (img)?
>>
>> <img alt="First" src="first.gif">
>> <img alt="Second" src="second.gif">[/color]
>
>
> Hint: If you have the following HTML code:
>
> <p>HEL
> LO</p>
>
> it would appear as HEL LO in a browser, not as HELLO. If you want HELLO, you
> have to have
>
> <p>HELLO</p>
>[/color]
HACK:

<style type="text/css" media="screen">
p span{
display:block;
float:left;
}
</style>

<p><span>HEL</span>
<span>LO</span></p>

Also possible with images, though it doesn't work correctly in older
browsers, especially the ones that don't get CSS.

--
Anne van Kesteren
http://www.annevankesteren.nl/
  #8  
Old July 20th, 2005, 05:29 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: Remove space between images


"Anne van Kesteren" <mail@annevankesteren.nl> wrote in message
news:bo8dlc$lks$2@reader11.wxs.nl...[color=blue]
> Harlan Messinger wrote:
>[color=green]
> > "Daniel" <daniel.frey@switzerland.org> wrote in message
> > news:24692148.0311031431.58ec4d0a@posting.google.c om...
> >[color=darkred]
> >>Hi
> >>
> >>I'd like to discuss the following problem: How to remove the space
> >>between two images (img)?
> >>
> >> <img alt="First" src="first.gif">
> >> <img alt="Second" src="second.gif">[/color]
> >
> >
> > Hint: If you have the following HTML code:
> >
> > <p>HEL
> > LO</p>
> >
> > it would appear as HEL LO in a browser, not as HELLO. If you want HELLO,[/color][/color]
you[color=blue][color=green]
> > have to have
> >
> > <p>HELLO</p>
> >[/color]
> HACK:[/color]

[hack snipped]

Why would someone use a hack instead of just fixing his code?

If the idea is to prevent long lines without breaks (for example, if there
were twenty images instead of two), then this works:

<img
alt="First" src="first.gif"[color=blue]
><img[/color]
alt="Second" src="second.gif"[color=blue]
>[/color]

This may look odd to HTML coders, but it's a common programming style for
handling long lines of code.

  #9  
Old July 20th, 2005, 05:29 PM
Anne van Kesteren
Guest
 
Posts: n/a
Default Re: Remove space between images

Harlan Messinger wrote:[color=blue]
> Why would someone use a hack instead of just fixing his code?[/color]
I think nobody would do that :-)[color=blue]
>
> If the idea is to prevent long lines without breaks (for example, if there
> were twenty images instead of two), then this works:
>
> <img
> alt="First" src="first.gif"[color=green]
> ><img[/color]
> alt="Second" src="second.gif"[color=green]
> >[/color]
>
> This may look odd to HTML coders, but it's a common programming style for
> handling long lines of code.[/color]
Just wanted to show it _is_ possible. It was not my intention to
recommend this. That was also the reason I responded to your suggestion
and not to Daniel's question ;-)

--
Anne van Kesteren
http://www.annevankesteren.nl/
  #10  
Old July 20th, 2005, 05:29 PM
Daniel
Guest
 
Posts: n/a
Default Re: Remove space between images

Thanks to all. It basically solved my problem.
Daniel
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles