From: Jeff Thies on
The Ultimate Failure wrote:
> On Apr 8, 11:34 am, dorayme <dora...(a)optusnet.com.au> wrote:
>> In article
>> <e99c051e-ba54-44f8-bb42-531fb0dc7...(a)h27g2000yqm.googlegroups.co
>> m>,
>> The Ultimate Failure <lee...(a)gmail.com> wrote:
>>
>>> Hi there, I've been trying to make something which lines two divs up
>>> inside a parent div, i've tried absolute positioning and floats but
>>> both end up looking something like this:
>>> http://img535.imageshack.us/img535/3082/78872756.png(where the parent
>>> div collapses)
>> Try giving A the style of 'overflow: hidden;' to force the parent
>> to grow height for its children.
>>
>> Or, for the benefit of older IE browsers, just before the close
>> of the A element, just before the closing tag and after all the
>> children (B and C) have been put to bed, put in a further div, an
>> empty one styled to 'clear: both;'
>>
>> --
>> dorayme
>
> The "overflow: hidden;" attribute is working nicely, thanks =]

Have you looked in IE? You may need to add zoom:1;

Jeff
From: The Ultimate Failure on
On Apr 10, 8:29 pm, Jeff Thies <jeff_th...(a)att.net> wrote:
> The Ultimate Failure wrote:
> > On Apr 8, 11:34 am, dorayme <dora...(a)optusnet.com.au> wrote:
> >> In article
> >> <e99c051e-ba54-44f8-bb42-531fb0dc7...(a)h27g2000yqm.googlegroups.co
> >> m>,
> >>  The Ultimate Failure <lee...(a)gmail.com> wrote:
>
> >>> Hi there, I've been trying to make something which lines two divs up
> >>> inside a parent div, i've tried absolute positioning and floats but
> >>> both end up looking something like this:
> >>>http://img535.imageshack.us/img535/3082/78872756.png(wherethe parent
> >>> div collapses)
> >> Try giving A the style of 'overflow: hidden;' to force the parent
> >> to grow height for its children.
>
> >> Or, for the benefit of older IE browsers, just before the close
> >> of the A element, just before the closing tag and after all the
> >> children (B and C) have been put to bed, put in a further div, an
> >> empty one styled to 'clear: both;'
>
> >> --
> >> dorayme
>
> > The "overflow: hidden;" attribute is working nicely, thanks =]
>
> Have you looked in IE? You may need to add zoom:1;
>
>    Jeff

I've not tried in IE7 or below, but in IE8 it seems to look the same
as it does in Safari and Firefox so I guess it's all good, I guess :)
From: dorayme on
In article
<e8c0e376-8f2b-480d-a461-c5b77d013821(a)35g2000yqm.googlegroups.com
>,
The Ultimate Failure <leet91(a)gmail.com> wrote:

> On Apr 10, 8:29 pm, Jeff Thies <jeff_th...(a)att.net> wrote:
> > The Ultimate Failure wrote:
> > > On Apr 8, 11:34 am, dorayme <dora...(a)optusnet.com.au> wrote:
> > >> In article
> > >> <e99c051e-ba54-44f8-bb42-531fb0dc7...(a)h27g2000yqm.googlegroups.co
> > >> m>,
> > >>  The Ultimate Failure <lee...(a)gmail.com> wrote:
> >
> > >>> Hi there, I've been trying to make something which lines two divs up
> > >>> inside a parent div, i've tried absolute positioning and floats but
> > >>> both end up looking something like this:
> > >>>http://img535.imageshack.us/img535/3082/78872756.png(wherethe parent
> > >>> div collapses)
> > >> Try giving A the style of 'overflow: hidden;' to force the parent
> > >> to grow height for its children.
> >
> > >> Or, for the benefit of older IE browsers, just before the close
> > >> of the A element, just before the closing tag and after all the
> > >> children (B and C) have been put to bed, put in a further div, an
> > >> empty one styled to 'clear: both;'
> >

> > > The "overflow: hidden;" attribute is working nicely, thanks =]
> >
> > Have you looked in IE? You may need to add zoom:1;
> >
> >    Jeff
>
> I've not tried in IE7 or below, but in IE8 it seems to look the same
> as it does in Safari and Firefox so I guess it's all good, I guess :)

Be careful. It is not 'all good' where floats are concerned for
below IE8 (which together command a sizeable proportion of
browsers being used). So take a look and keep my above para about
older IE and Jeff's advice handy.

It can often happen that the problem does not show in say IE6
because in that browser, the parent of wholly floated children
often naturally grows height to 'house' them (against
standards!). But you cannot *always* depend on this, check your
productions and take appropriate actions. No manual or super
standard has ever been written to cope with browser oddities.
Where browsers do not follow agreed standards, it is the wild
west and you must go armed and have spare ammo, there is no
sherif (at least not a sober or uncorrupted one).

--
dorayme
First  |  Prev  | 
Pages: 1 2
Prev: Inline List and No Wrap problem
Next: A Pseudo Classes