HighDots Forums  

Re: CSS gap between inline elements

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


Discuss Re: CSS gap between inline elements in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
C A Upsdell
 
Posts: n/a

Default Re: CSS gap between inline elements - 02-07-2008 , 07:48 AM






DrPanic wrote:
Quote:
Hello.

I can fix the problem using float:left in the LI elements but I need
to understand why is Mozilla drawing it whith that gap.
Using float:left is the correct solution


Reply With Quote
  #2  
Old   
Andy Dingley
 
Posts: n/a

Default Re: CSS gap between inline elements - 02-08-2008 , 01:06 PM






On 7 Feb, 13:48, C A Upsdell <cupsd... (AT) upsdell (DOT) invalid> wrote:

Quote:
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" ?
Does this always apply, or is there any context-based reason to favour
one over the other?


Reply With Quote
  #3  
Old   
Ben C
 
Posts: n/a

Default Re: CSS gap between inline elements - 02-08-2008 , 01:25 PM



On 2008-02-08, Andy Dingley <dingbat (AT) codesmiths (DOT) com> wrote:
Quote:
On 7 Feb, 13:48, C A Upsdell <cupsd... (AT) upsdell (DOT) invalid> wrote:

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).


Reply With Quote
  #4  
Old   
Andy Dingley
 
Posts: n/a

Default Re: CSS gap between inline elements - 02-08-2008 , 07:33 PM



On 8 Feb, 19:25, Ben C <spams... (AT) spam (DOT) eggs> wrote:
Quote:
On 2008-02-08, Andy Dingley <ding... (AT) codesmiths (DOT) com> wrote:

On 7 Feb, 13:48, C A Upsdell <cupsd... (AT) upsdell (DOT) invalid> wrote:

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.

Quote:
(or inline-blocks of course when people start supporting them).
I'd deliberately ignored inline-block. Tired of waiting for support 8-
(



Reply With Quote
  #5  
Old   
Ben C
 
Posts: n/a

Default Re: CSS gap between inline elements - 02-09-2008 , 04:46 AM



On 2008-02-09, Andy Dingley <dingbat (AT) codesmiths (DOT) com> wrote:
Quote:
On 8 Feb, 19:25, Ben C <spams... (AT) spam (DOT) eggs> wrote:
On 2008-02-08, Andy Dingley <ding... (AT) codesmiths (DOT) com> wrote:

On 7 Feb, 13:48, C A Upsdell <cupsd... (AT) upsdell (DOT) invalid> wrote:

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.


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.