IE prob w/overflow auto and scrollbars

why am I getting scrollbars here in IE7?
http://mayacove.com/dev/of/test.html

I have to give both the top & bottom container overflow:auto, otherwise some browsers add space betw them… I don’t want any space betw them…
(and they have to be two separate divs b/c the top one has rounded corners on top, the bottom one has rounded corners at the bottom…)

(WHY do browsers add extraneous, non-existent space betw elements unless you give them overflow:auto??? shouldn’t margin:0; be enough??? this drives me up the wall… :frowning:

so now this works in all browsers except IE7… what is solution please… WHY is IE7 adding extraneous scrollbars here??? I don’t width or height set anywhere inside the two containers (except a height of 4px in two obvious spots…)

thank you…

Hi, remove the overflow:auto; and this issue will go away altogether.

Now you have that space between them. You say you set the margins to 0? Maybe on the <div> but not on what is actually causing it :). Header elements, along with <p>, and others come with default margins set. You are experiencing those margins pushing those elements away. If you set those elements to 0 margins, you will see the space go away, and since you don’t have overflow:auto; set now, no scrollbars will appear :).

You are also experiencing margin collapse a few places on that page, attributing to a few messups through the page (if you’ve been wondering why your top margin hasn’t been working as you’d expect lately)

oh my gosh – I use a reset… EM’s reset, in fact… I forgot to include it in this bear-bones… before I started using it at the very least I would include this


p {margin:0 0 15px 0; padding:0;  ; }
div {margin:0; padding:0; }
h1,h2,h3,h4,h5 {margin:0; padding:0; }
img { border: 0px; }

as my own “reset”… :wink: I have now included this css code in my page, http://mayacove.com/dev/of/test.html
(won’t be able to test on IE7 till tomorrow morning though… & remember, this is only happening on IE7, not other browsers… I only have one paragr on the pg, it’s not in area where the extraneous scrollbars are showing… )

(sorry about previous post, not sure what happened… typing was extremely slow (lots of “lag”… ) I kept typing, hit “return”… it posted msg instead of doing line-break… can you remove yr own post ?? )

thank you…

I assume I was able to answer your issue :). You’re welcome.