HighDots Forums  

Remove space between images

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Remove space between images in the HTML forum.

Reply
 
Thread Tools Display Modes
  #1  
Old   
Daniel
 
Posts: n/a

Default Remove space between images - 11-03-2003 , 05:31 PM






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



Reply With Quote
  #2  
Old   
Mark Parnell
 
Posts: n/a

Default Re: Remove space between images - 11-03-2003 , 05:51 PM






Sometime around 3 Nov 2003 14:31:13 -0800, Daniel is reported to have
stated:

Quote:
Hi
G'day.

Quote:
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"

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

HTH

--
Mark Parnell
http://www.clarkecomputers.com.au


Reply With Quote
  #3  
Old   
Spartanicus
 
Posts: n/a

Default Re: Remove space between images - 11-03-2003 , 05:56 PM



Daniel wrote:

Quote:
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"
<img alt="First" src="first.gif"><img alt="Second" src="second.gif">

--
Spartanicus


Reply With Quote
  #4  
Old   
Find Yourself
 
Posts: n/a

Default Re: Remove space between images - 11-03-2003 , 07:30 PM



<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 (AT) switzerland (DOT) org> wrote

Quote:
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



Reply With Quote
  #5  
Old   
Markus Ernst
 
Posts: n/a

Default Re: Remove space between images - 11-04-2003 , 04:32 AM



"Daniel" <daniel.frey (AT) switzerland (DOT) org> schrieb im Newsbeitrag
news:24692148.0311031431.58ec4d0a (AT) posting (DOT) google.com...
Quote:
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
Try this (not tested):

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

--
Markus




Reply With Quote
  #6  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Remove space between images - 11-04-2003 , 09:16 AM




"Daniel" <daniel.frey (AT) switzerland (DOT) org> wrote

Quote:
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"
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>



Reply With Quote
  #7  
Old   
Anne van Kesteren
 
Posts: n/a

Default Re: Remove space between images - 11-04-2003 , 09:34 AM



Harlan Messinger wrote:

Quote:
"Daniel" <daniel.frey (AT) switzerland (DOT) org> wrote in message
news:24692148.0311031431.58ec4d0a (AT) posting (DOT) google.com...

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"


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

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/


Reply With Quote
  #8  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Remove space between images - 11-04-2003 , 10:52 AM




"Anne van Kesteren" <mail (AT) annevankesteren (DOT) nl> wrote

Quote:
Harlan Messinger wrote:

"Daniel" <daniel.frey (AT) switzerland (DOT) org> wrote in message
news:24692148.0311031431.58ec4d0a (AT) posting (DOT) google.com...

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"


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

HACK:
[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"
Quote:
img
alt="Second" src="second.gif"

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



Reply With Quote
  #9  
Old   
Anne van Kesteren
 
Posts: n/a

Default Re: Remove space between images - 11-04-2003 , 11:30 AM



Harlan Messinger wrote:
Quote:
Why would someone use a hack instead of just fixing his code?
I think nobody would do that :-)

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"
img
alt="Second" src="second.gif"


This may look odd to HTML coders, but it's a common programming style for
handling long lines of code.
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/


Reply With Quote
  #10  
Old   
Daniel
 
Posts: n/a

Default Re: Remove space between images - 11-05-2003 , 07:46 PM






Thanks to all. It basically solved my problem.
Daniel

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.