Click here to get back home

CSS gap between inline elements

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
CSS gap between inline elements DrPanic 02-07-2008
Posted by Ben C on February 8, 2008, 2:25 pm
Please log in for more thread options
>
>> Using float:left is the correct solution
>
> It's certainly one solution. Is there any concrete reason to favour
> either display:inline or float:left for implementing "inline lists" ?

If you want to set widths or heights on the items, or guarantee their
adjacency, you need floats really (or inline-blocks of course when
people start supporting them).

Posted by Andy Dingley on February 8, 2008, 8:33 pm
Please log in for more thread options
>
>
> >> Using float:left is the correct solution
>
> > It's certainly one solution. Is there any concrete reason to favour
> > either display:inline or float:left for implementing "inline lists" ?
>
> If you want to set widths or heights on the items, or guarantee their
> adjacency, you need floats really

Widths is a good point. Generally though I don't care - set a bit of
margin & padding, let the text content take care of the rest. For most
situations with a non-block list, I care about spacing between words,
but not the overall item widths.

> (or inline-blocks of course when people start supporting them).

I'd deliberately ignored inline-block. Tired of waiting for support 8-
(


Posted by Ben C on February 9, 2008, 5:46 am
Please log in for more thread options
>>
>>
>> >> Using float:left is the correct solution
>>
>> > It's certainly one solution. Is there any concrete reason to favour
>> > either display:inline or float:left for implementing "inline lists" ?
>>
>> If you want to set widths or heights on the items, or guarantee their
>> adjacency, you need floats really
>
> Widths is a good point. Generally though I don't care - set a bit of
> margin & padding, let the text content take care of the rest. For most
> situations with a non-block list, I care about spacing between words,
> but not the overall item widths.
>
>> (or inline-blocks of course when people start supporting them).
>
> I'd deliberately ignored inline-block. Tired of waiting for support 8-
> (

The sad thing is it would solve a lot of problems. Centered
shrink-to-fit block and image galleries with captions where the images
are all different shapes and sizes can both be done easily with
inline-block.

It can even be used for vertical centering of auto-height blocks.

Posted by SAM on February 7, 2008, 12:19 pm
Please log in for more thread options
DrPanic a écrit :
> Hello.
>
> I have a problem building an horizontal navlist.
>
> The technique i'm using is very simple: a list with inline LI
> elements. It works fine but Mozilla render it with a gap between the
> LI elements, I can't understand where that gap comes from. IE7 doen't
> render it whith that space between inline LI elements.

Of course : the return is a space ...
suppress it between LI

<ul>
<li><a href="#">One
</a></li><li><a href="#">Two
</a></li><li><a href="#">Three
</a></li><li><a href="#">Four
</a></li>
</ul>

--
sm

Posted by prac on February 7, 2008, 3:19 pm
Please log in for more thread options
Hello

I try this
<li><a href="#">One</a></li><li><a href="#">Two</a></li><li><a
href="#">Three</a></li><li><a href="#">Four</a></li>

(without carriage return after </li>)

no gap under FF2

---

http://philippe.chappuis.googlepages.com/using-google-page-creator

---

Similar ThreadsPosted
Tweaking the style of child elements inline March 1, 2008, 10:59 am
inline frames September 21, 2005, 8:48 pm
inline images December 27, 2005, 2:48 am
display: inline question? April 26, 2008, 1:11 pm
Restricting inline image size March 29, 2005, 6:56 pm
Re: Restricting inline image size March 29, 2005, 9:24 pm
Re: Restricting inline image size March 30, 2005, 2:07 am
Two lines of text in inline context September 1, 2005, 5:40 am
"Glueing" grapchic with inline text together? November 4, 2005, 10:20 am
Showing target of a link inline November 15, 2005, 6:00 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap