This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2005 > Div border not drawn around 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 Div border not drawn around contents
Stuart Scharf

2005-12-02, 6:48 pm

I am trying to use a div with a border (class=info) to contain two other
divs.

http://www.etzchaimsharon.org/announcements.htm
http://www.etzchaimsharon.org/announcements.css

on IE this seems to work correctly. On Firefox and most other browsers,
the border is drawn as if the div was empty and did not contain the
other divs.

Any idea why this is happening?

Stuart Scharf
David Dorward

2005-12-02, 6:48 pm

Stuart Scharf wrote:

> I am trying to use a div with a border (class=info) to contain two other
> divs.
> on IE this seems to work correctly. On Firefox and most other browsers,
> the border is drawn as if the div was empty and did not contain the
> other divs.


http://www.complexspiral.com/public...taining-floats/

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Stuart Scharf

2005-12-05, 6:59 pm

David Dorward wrote:
> Stuart Scharf wrote:
>
>
>
>
> http://www.complexspiral.com/public...taining-floats/
>


Thanks, I had forgotten that the contained div's were floats and what
that implied.

While playing, I noticed that if I set the containing div to
overflow=hidden (or anything other then visible) the border was
also correct, but I have no idea why that worked.

(I have since corrected the origional url by adding a clearing div)
Sponsored Links


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