Le 28 juin 2012 à 22:58, Tim Dawson a écrit :

> http://www.webadit.co.uk/mullbed2/
> I'm trying to set up a fluid layout (something I've shied away from for a 
> long time). What you see here is by way of a trial run, to sort out a few 
> ideas. To get the images to scale correctly I've given them a % width of just 
> under 25% of their containing DIV. If given exactly 25% (each) they no longer 
> fit in one row. There's no padding on the containing DIV or the images. How 
> do I get them to fill the DIV exactly ? (with no gaps between them, or 
> underneath).

The space between the images is the white-space (on each line) between the 
images in your source-code, that gets normalised to one (1) space character 
[1]. The space below the images is the space for descenders, images are inline 
elements and rest on the baseline.

Floating the images (float:left) will take care of both as Tom notes (you don't 
need to specify 'display: block' as the float property already makes the images 
display: block [2].

[1] http://www.w3.org/TR/CSS21/text.html#white-space-model
[2] http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo

Philippe
--
Philippe Wittenbergh
http://l-c-n.com/






______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to