This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > May 2006 > How do I get the div to be the full height of the contents?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I get the div to be the full height of the contents?
Alan Silver

2006-05-03, 7:04 pm

Hello,

Please look at http://www.kidsinaction.org.uk/fd2/x.html

In FF, it looks how I would like, but this required me to add an extra
div (id of "ferret") after the first ul in the page. I think this was so
that there would be something to clear, which made the div with id
"sectionlinks" be high enough. I'm sure that there is a better way to do
it than this!!

Even if there wasn't a better way, it doesn't work in IE (surprise) as
IE insists on giving the "ferret" div a height, even though I set it to
be zero.

Any suggestions on how to fix this? Ideally, I would like to have the
page looking like it does now in FF, but without needing the extra div.
I'm sure this can be done, I just don't know how ;-)

By the way, there are still a few issues with the page, such as font
sizes being too small in the margin, etc. Please don't shout at me for
this, I'm still experimenting with it!! Also, the blank space at the top
is for a header which I chopped out of the HTML to make it shorter.

TIA for any help.

--
Alan Silver
(anything added below this line is nothing to do with me)
Alan Silver

2006-05-03, 7:04 pm

In article <TbR2COHRDPWEFwJ3@nospamthankyou.spam>, Alan Silver
<alan-silver@nospam.thanx.invalid> writes
>Hello,


In case it helps, I have added a second version of the page, this time
without the extra div, so you can see what is happening. Ideally, I
would like to get the height working without adding extra (unneeded)
content.

http://www.kidsinaction.org.uk/fd2/y.html

Ironically, this version looks almost how I want it in IE, but lousy in
FF!!

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)
Jim Moe

2006-05-03, 7:04 pm

Alan Silver wrote:
>
> Please look at http://www.kidsinaction.org.uk/fd2/x.html
>
> In FF, it looks how I would like, but this required me to add an extra
> div (id of "ferret") after the first ul in the page. I think this was so
> that there would be something to clear, which made the div with id
> "sectionlinks" be high enough. I'm sure that there is a better way to do
> it than this!!
>

See <http://positioniseverything.net/easyclearing.html>.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Martin Eyles

2006-05-04, 7:04 am


"Alan Silver" <alan-silver@nospam.thanx.invalid> wrote in message
news:TbR2COHRDPWEFwJ3@nospamthankyou.spam...
>
> Please look at http://www.kidsinaction.org.uk/fd2/x.html
>
> Even if there wasn't a better way, it doesn't work in IE (surprise) as IE
> insists on giving the "ferret" div a height, even though I set it to be
> zero.
>
> Any suggestions on how to fix this?


Put a comment inside the ferret div.

ie.

<div id="ferret"><!-- --></div>

don't know why it works, but I use it loads to do graphs on IE specific "web
apps"

HTH,

Martin


Alan Silver

2006-05-04, 8:23 pm

In article <7uGdna_ioIChscTZRVn-pw@giganews.com>, Jim Moe
<jmm-list.AXSPAMGN@sohnen-moe.com> writes
> See <http://positioniseverything.net/easyclearing.html>.


Thanks, looks like a good article. Just printing it out now.

--
Alan Silver
(anything added below this line is nothing to do with me)
Alan Silver

2006-05-04, 8:23 pm

In article <125jlhbk5n5fuf6@corp.supernews.com>, Martin Eyles
<martin.eyles@NOSPAMbytronic.com> writes
>
>"Alan Silver" <alan-silver@nospam.thanx.invalid> wrote in message
>news:TbR2COHRDPWEFwJ3@nospamthankyou.spam...
>
>Put a comment inside the ferret div.
>
>ie.
>
><div id="ferret"><!-- --></div>
>
>don't know why it works, but I use it loads to do graphs on IE specific "web
>apps"


Huh? Isn't that weird!! Mind you, I have come to expect the unexpected
from IE!!

Thanks a lot, it gives me a temporary fix whilst I read the article that
Jim Moe linked. Ideally, I would like to avoid having the ferret div
there as it's not part of the document content, and is only there to get
around this problem. If that article offers a way of doing it without
the superfluous div, then I will do that instead.

Thanks again.

--
Alan Silver
(anything added below this line is nothing to do with me)
Jim Moe

2006-05-04, 8:23 pm

Martin Eyles wrote:
>
> Put a comment inside the ferret div.
> <div id="ferret"><!-- --></div>
>
> don't know why it works, but I use it loads to do graphs on IE specific "web
> apps"
>

It does the same thing as
<http://positioniseverything.net/easyclearing.html>.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
boclair

2006-05-04, 11:10 pm

Jim Moe wrote:
> Martin Eyles wrote:
> It does the same thing as
> <http://positioniseverything.net/easyclearing.html>.
>


And its interesting, with this method, how IE manages to mess up margin
collapse, or rather non collapse.

Louise
phil-news-nospam@ipal.net

2006-05-05, 5:03 am

On Fri, 05 May 2006 02:57:06 GMT boclair <boclair@bigpond.net.au> wrote:
| Jim Moe wrote:
|> Martin Eyles wrote:
|>>> Any suggestions on how to fix this?
|>> Put a comment inside the ferret div.
|>> <div id="ferret"><!-- --></div>
|>>
|>> don't know why it works, but I use it loads to do graphs on IE specific "web
|>> apps"
|>>
|> It does the same thing as
|> <http://positioniseverything.net/easyclearing.html>.
|>
|
| And its interesting, with this method, how IE manages to mess up margin
| collapse, or rather non collapse.

Why do they call it "collapse"? It seems to me from the description the
current word would be "overlap".

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Jim Moe

2006-05-05, 5:03 am

boclair wrote:
>
> And its interesting, with this method, how IE manages to mess up margin
> collapse, or rather non collapse.
>

MS has its priorities for its business model:
1. Marketing blitzes
2. FUD
3. Monopoly leverage
4. Legal attacks
5. Sales channel constriction
6. Technical excellence

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mark Parnell

2006-05-05, 5:03 am

Deciding to do something for the good of humanity, Jim Moe
<jmm-list.AXSPAMGN@sohnen-moe.com> declared in
comp.infosystems.www.authoring.stylesheets:

> MS has its priorities for its business model:

<snip>
> 6. Technical excellence


It's that high on the list?

--
Mark Parnell
My Usenet is improved; yours could be too:
http://blinkynet.net/comp/uip5.html
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews