# \[CSS\] div doesn't follow scrolling

**URL:** <https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565>\
**Category:** Uncategorized\
**Created:** [April 5, 2006, 10:47pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565 "2006-04-05T22:47:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dasmonstrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dasmonstrum](https://forum.kirupa.com/u/Dasmonstrum)\
**Post date:** [April 5, 2006, 10:47pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/1 "2006-04-05T22:47:03Z")

</div>

Hi People,

I’m having this problem on Safari and Firefox. When the page loads, everything is okay, but when scrolls, the div on the back doesn’t follow it, stays where it loads.  
Please check here:

[http://www.dwdesign.com.br/picture2.png](http://www.dwdesign.com.br/picture2.png)

Please, someone have a idea?

Thank you!

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 6, 2006, 1:07am UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/2 "2006-04-06T01:07:42Z")

</div>

Have a link to the page online or some code to look at? Kind of hard to help just by looking at an image.

---

<div class="post-metadata">

**Author:** ![Dasmonstrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dasmonstrum](https://forum.kirupa.com/u/Dasmonstrum)\
**Post date:** [April 6, 2006, 5:38pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/3 "2006-04-06T17:38:28Z")

</div>

Hi Ankou,

here it goes:

[http://www.pereira-adv.com](http://www.pereira-adv.com)

Thanks!

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 6, 2006, 10:47pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/4 "2006-04-06T22:47:54Z")

</div>

I haven’t had any time to try to find a fix, but the reason for the problem you’re having is from the height: 100% for the two rulesets in your CSS and the way Firefox/Safari handle it. Actually only one of those height: 100%'s may be the cause of the problem.

I was going to suggest a simple fix of making a background image for the body that consisted of the white background and gray (umm… blueish-gray) borders. Then just repeat that horizontally. But then I noticed that your body is already using the graident background image. So that wouldn’t work so well. ☹

I’ll try playing around with a few ideas and let ya know if I come up with something. If I don’t post something here, it’s because I haven’t figured it out… or I had one too many 🍺

---

<div class="post-metadata">

**Author:** ![Dasmonstrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dasmonstrum](https://forum.kirupa.com/u/Dasmonstrum)\
**Post date:** [April 7, 2006, 3:04pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/5 "2006-04-07T15:04:51Z")

</div>

Hi Ankou!

thank you very much for your attention!  
if I find something, I will also post here…

Have a nice weekend!

Cheers!

---

<div class="post-metadata">

**Author:** ![Dasmonstrum](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@Dasmonstrum](https://forum.kirupa.com/u/Dasmonstrum)\
**Post date:** [April 7, 2006, 3:20pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/6 "2006-04-07T15:20:46Z")

</div>

Hi Ankou!

in a brazilian forum, [http://www.tableless.com.br/forum](http://www.tableless.com.br/forum)  
people give a tip:

put display:table at div:geral

Works perfect!

Thank you for the help!

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 7, 2006, 7:51pm UTC](https://forum.kirupa.com/t/css-div-doesnt-follow-scrolling/184565/7 "2006-04-07T19:51:23Z")

</div>

Yeah I knew that would work I was just worried about browser support for display: table. If you check out [Quirksmode.org](http://Quirksmode.org) you’ll see what had me worried – [http://www.quirksmode.org/css/contents.html](http://www.quirksmode.org/css/contents.html)

I guess if it does fail in IE (Win and Mac) you could always apply a hack, but I try my best to avoid hacks at all costs.

Anyway, glad to hear that it’s working for you. Sorry I wasn’t of any use to ya. 🙂
