Float left, float right, looking right in Safari

Posted by Dan Eastwell Fri, 12 Jan 2007 11:05:46 GMT

If you have a containing element (.container) with two elements, floated left and right, with fixed widths, the implied space between them wont show within Safari, unless the containing element's width is specified.

If the width is not specified, all browsers except safari assume the container takes up 100% of the space it has to go in. Safari was assumes it takes up 100% of the space its components occupied.

The margin between objects is 'implied', in that it was 'the space between objects'. In safari, this means there is no implied space between these floated elements.

Setting:


div.container{

    width:100%;

}

sorts it out.

Posted in ,  | 1 comment | no trackbacks

Comments

  1. Avatar David Yaghoobi said about 21 hours later:

    I thought I’d found you, but found you here.

    Hope all’s well with you. Keep up the good work.

    David

Trackbacks

Use the following link to trackback from your own site:
http://www.thoughtballoon.co.uk/blog/trackbacks?article_id=float-left-float-right-looking-right-in-safari&day=12&month=01&year=2007

(leave url/email »)

   Comment Markup Help Preview comment