HighDots Forums  

Re: How to remove gap between neighbour inline images?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: How to remove gap between neighbour inline images? in the Cascading Style Sheets forum.



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

Default Re: How to remove gap between neighbour inline images? - 09-03-2003 , 05:10 AM








Jim Dabell wrote:
Quote:
Milos Prudek wrote:


To have two or more images sit tight together I would normally use a
table. With CSS "display:inline", I cannot find a way to remove a few
pixels of whitespace.

[snip]

That's because the problem isn't with the CSS, but with the HTML. You have
whitespace because there is whitespace in the document. Remove the
whitespace from between the <div> elements, and it won't show up. Note
that there's also a stray space inside the second link.
Thank you! Now it works, but the source code is now horrible, because
all images reside on a single HTML line. See the updated
http://www.spoxdesign.com/test3/images.html

Is there no way to divide the <div> image tags into several lines and
still keep images tight together?

--
Milos Prudek



Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: How to remove gap between neighbour inline images? - 09-03-2003 , 05:26 AM






Milos Prudek <milos.prudek (AT) tiscali (DOT) cz> wrote:

Quote:
Now it works, but the source code is now horrible, because
all images reside on a single HTML line.
You can put line breaks inside <img> tags, e.g.

<img src="contact.gif"
alt="Kontakty ">

Note that currently your images all lack the required attributes.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #3  
Old   
Milos Prudek
 
Posts: n/a

Default Re: How to remove gap between neighbour inline images? - 09-03-2003 , 05:59 AM



Quote:
Yo can place the line breaks within comments:

img ...><!--
--><img ...
Thanks! Done. See current http://www.spoxdesign.com/test3/images.html

The HTML source still looks slightly repulsive... but it's an improvement.

Is it perhaps wiser to stick to using plain old tables for such tasks?
With the CSS solution, it feels like a hack if I have to use HTML
comments or split img tags in the middle as Jukka suggested.

--
Milos Prudek



Reply With Quote
  #4  
Old   
Stan Brown
 
Posts: n/a

Default Re: How to remove gap between neighbour inline images? - 09-03-2003 , 11:46 AM



In article <m2fzjejh25.fsf (AT) obelix (DOT) bakkelygaard.dk> in
comp.infosystems.www.authoring.stylesheets, Anders Wegge Jakobsen
<wegge (AT) bakkelygaard (DOT) dk> wrote:
Quote:
"Milos" == Milos Prudek <milos.prudek (AT) tiscali (DOT) cz> writes:
Is there no way to divide the <div> image tags into several lines and
still keep images tight together?

Yo can place the line breaks within comments:

img ...><!--
--><img ...
That's really slick! I never thought of doing it that way. I've
always done <img
src=...>, i.e. put the line break before an attribute within the
tag.

Tak for artiklen!

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/


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 - 2008, Jelsoft Enterprises Ltd.