473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 20 '05 #1
9 41420
Sometime around 3 Nov 2003 14:31:13 -0800, Daniel is reported to have
stated:
Hi
G'day.

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
Jul 20 '05 #2
Daniel wrote:
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
Jul 20 '05 #3
<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" <da*********@switzerland.org> wrote in message
news:24**************************@posting.google.c om...
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

Jul 20 '05 #4
"Daniel" <da*********@switzerland.org> schrieb im Newsbeitrag
news:24**************************@posting.google.c om...
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
Jul 20 '05 #5

"Daniel" <da*********@switzerland.org> wrote in message
news:24**************************@posting.google.c om...
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>

Jul 20 '05 #6
Harlan Messinger wrote:
"Daniel" <da*********@switzerland.org> wrote in message
news:24**************************@posting.google.c om...
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/
Jul 20 '05 #7

"Anne van Kesteren" <ma**@annevankesteren.nl> wrote in message
news:bo**********@reader11.wxs.nl...
Harlan Messinger wrote:
"Daniel" <da*********@switzerland.org> wrote in message
news:24**************************@posting.google.c om...
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"<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.

Jul 20 '05 #8
Harlan Messinger wrote:
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/
Jul 20 '05 #9
Thanks to all. It basically solved my problem.
Daniel
Jul 20 '05 #10

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

Similar topics

8
by: JT | last post by:
i have written some asp that reads a fixed length text file, line by line, inserting each line into my database. my problem is that the text file format seems to have extra space at the end of the...
8
by: Joseph | last post by:
I have a textBox that people writes stories in it. They can use for format. I have Aspell installed on the server, so people can make correction to their text. Sometimes, they forget to add a...
2
by: Beffmans | last post by:
Hi How do i remove the space below the 'hello'? <TABLE> <tbody> <tr> <td> <asp:panel id="pnlTop" Runat="server"> <TABLE>
3
by: Kentor | last post by:
Hello, I'm looking for a script that will be javascript/php compatible that will take existing images from a database and will allow editing/removing/adding new images. If JS is on then it should...
8
by: voroojak | last post by:
i want to remove space in my table. it is a text box and i want to remove the space after the character. the field is integer thanks aot
5
by: Steve | last post by:
I'm getting string returned from my Database with a space in front of it, it sometimes it looks like this 8 9 10 1 and so one, how can I remove the white space in front of the numbers? Its...
4
by: ashish1779 | last post by:
hi I am new in PHP, i have face one problem when I crawl any site and i have to save the whole HTML content in database, on that time all the HTML tags are changes into the extra space in content...
6
by: Mladen Mavrovic | last post by:
Hi everyone, I have to fix this asap, and I tried all I know, but there was no joy. Please, take a look at http://stampamajica.in.rs/ There are 3 html pages there. Can anybody tell me how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.