Solved

Removing space between images

Posted on 2002-04-28
5
142 Views
Last Modified: 2010-04-09
I have several images that I want to show up one after the other from left to right with the right edge of the previous one touching the left edge of the next one.

When I list them like this:

<img src="whatever">
<img src="whatever">
<img src="whatever">

... I get a little bit of space between them but when I list them like this:

<img src="whatever"><img src="whatever"><img src="whatever">

... the space goes away.

The problem is that I have them surrounded by link tags with a bunch of attributes and if I put the tags end to end (the second way) I have to scroll way to the right and it is hard to read the code.

Is there any way to be able to list each image tag on a separate line and still get the actual images to line up perfectly from left to right?

Any help would be greatly appreciated.
0
Comment
Question by:moshecristel
  • 2
  • 2
5 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6975214
No.  What you are seeing is the white space created by the line feed.  If they are not on the same line the browser will put in the space just as if you had typed in a space.

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6975219
You might be able to solve it with a table, but then you just create some new problems.  It is nice if the code is pretty, but the user sees what is on the page, not the code;  except for us HTML geeks, and we know why it is written that way.

Cd&
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 6975383
<img
src="whatever"><img
src="whatever"><img
src="whatever">
0
 

Author Comment

by:moshecristel
ID: 6975708
It's not the ideal way to have to do it but it's a good idea.  Thanks.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6976479
as Cd& said, it's code for HTML geeks ;-)
Now you know why to trash FrontP..., Dream.. etc.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now