Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Overflowing div problem...

Featured Replies

Hi all,

 

If you visit, http://new.lambwatch.co.uk/news.htm you will immediately see the problem and what I am trying to achive... the odd thing is, the overflow div is registering the need for a scroll bar but it's not putting the content into the div!?!? Most bizarre. This is for both IE7 and FF3.... Even more bizarrely, if you visit http://new.lambwatch.co.uk/chat.htm the same construction is going on but it is working fine..

This leads me to believe it is a problem with the "datebox" divs in the "newsheadline" divs... or something to do with that!

 

Your expert help would be muchly appreciated!

 

Cheers,

Dan

It's because you've absolutely positioned the content, so it's been removed from the document flow (contradicting the overflow auto).

 

Remove the properties, i don't see why you need them, but if it causes any further problems these can be fixed without the use of positioning properties.

 

I'll have a more detailed look soon, unless someone else can help you a bit more.

  • Author
Can you post both the XHTML and the CSS please?

 

Certainly, here is the XHTML ---

<div class="overflow">
<h2>LambWatch News!</h2>

<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Mar</div>
	<div class="daybox">23</div>
</div>
<div class="dateboxcontent">

<p><b><span class='bigger'><!--<a href="/news-38-patch-taken-to-vets-update-2.htm" title="Patch Taken To Vets *update 2*">-->Patch Taken To Vets *update 2*<!--</a>--></span></b> - <em><!--<a href="/archive-day-20090323.htm">-->23/03/2009 14:16:25<!--</a>--></em></p>
<p>Patch has been taken to the vet after having had a large prolapse despite never lambing before.</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Feb</div>
	<div class="daybox">21</div>

</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-37-first-arrivals-of-2009.htm" title="First Arrivals of 2009">-->First Arrivals of 2009<!--</a>--></span></b> - <em><!--<a href="/archive-day-20090221.htm">-->21/02/2009 17:07:07<!--</a>--></em></p>
<p>Here are some photos of our first born lambs of 2009 spending time in the barn.</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Dec</div>

	<div class="daybox">20</div>
</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-36-lamb-rescue-mission-ends-happily.htm" title="Lamb Rescue Mission Ends Happily">-->Lamb Rescue Mission Ends Happily<!--</a>--></span></b> - <em><!--<a href="/archive-day-20081220.htm">-->20/12/2008 15:15:15<!--</a>--></em></p>
<p>A worrying morning searching for lambs ends happily after Sir David spots them in neighbour's fields!</p>
</div>
</div>
<div class="newsheadline">

<div class="datebox">
	<div class="monthbox">Nov</div>
	<div class="daybox">30</div>
</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-34-winter-has-arrived-updated.htm" title="Winter Has Arrived *updated*!">-->Winter Has Arrived *updated*!<!--</a>--></span></b> - <em><!--<a href="/archive-day-20081130.htm">-->30/11/2008 13:01:01<!--</a>--></em></p>

<p>The first proper cold-snap of the 2008 winter has arrived at LambWatch (and most of the UK!)</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Oct</div>
	<div class="daybox">27</div>
</div>
<div class="dateboxcontent">

<p><b><span class='bigger'><!--<a href="/news-32-eleven-new-arrivals.htm" title="Eleven New Arrivals">-->Eleven New Arrivals<!--</a>--></span></b> - <em><!--<a href="/archive-day-20081027.htm">-->27/10/2008 09:12:12<!--</a>--></em></p>
<p>We had 11 new arrivals who have been making themselves at home at the farm over the weekend!</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Oct</div>
	<div class="daybox">18</div>

</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-31-bulb-planting-for-spring.htm" title="Bulb Planting For Spring!">-->Bulb Planting For Spring!<!--</a>--></span></b> - <em><!--<a href="/archive-day-20081018.htm">-->18/10/2008 16:19:33<!--</a>--></em></p>
<p>"Churches Together" arranged a morning of bulb planting amongst the new trees ready for Spring!</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Aug</div>

	<div class="daybox">22</div>
</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-28-lone-ranger-reunited.htm" title="Lone Ranger Reunited!">-->Lone Ranger Reunited!<!--</a>--></span></b> - <em><!--<a href="/archive-day-20080822.htm">-->22/08/2008 11:19:19<!--</a>--></em></p>
<p>Our friendly visitor sheep was this morning safely reunited with its family across the river :)</p>
</div>
</div>
<div class="newsheadline">

<div class="datebox">
	<div class="monthbox">Jul</div>
	<div class="daybox">10</div>
</div>
<div class="dateboxcontent">
<p><b><span class='bigger'><!--<a href="/news-26-competition-updated-again.htm" title="Competition *updated again*!">-->Competition *updated again*!<!--</a>--></span></b> - <em><!--<a href="/archive-day-20080710.htm">-->10/07/2008 09:30:30<!--</a>--></em></p>

<p>We thought we would have a bit of fun to raise everyone's spirits following a sad week on LambWatch.</p>
</div>
</div>
<div class="newsheadline">
<div class="datebox">
	<div class="monthbox">Jul</div>
	<div class="daybox">6</div>
</div>
<div class="dateboxcontent">

<p><b><span class='bigger'><!--<a href="/news-25-a-mournful-day.htm" title="A mournful day">-->A mournful day<!--</a>--></span></b> - <em><!--<a href="/archive-day-20080706.htm">-->06/07/2008 22:44:44<!--</a>--></em></p>
<p>Today was a very sad and painful day for everyone at and involved with LambWatch :( </p>
</div>
</div>

....... and so on ..........

</div>

 

Here is the relevant CSS

 

div.overflow
{
overflow:auto;
height:inherit;
padding-right:4px;
}
div.datebox
{
height:51px;
width:47px;
position:absolute;
margin-top:5px;
}
div.dateboxcontent
{
position:absolute;
margin-left:55px;
}
div.dateboxcontent p
{
padding-bottom:0px;
}
span.bigger
{
font-size:14px;
}
div.newsheadline
{
height:64px;
}
div.newsheadline div.dateboxcontent
{
width:440px;
}
div.newsheadline div.datebox
{
margin-top:4px;
}

div.monthbox,div.daybox
{
text-align:center;
font-weight:bold;
width:47px;
}
div.monthbox
{
text-transform:uppercase;
height:16px;
padding-top:4px;
}
div.daybox
{
font-size:26px;
padding-top:3px;
height:28px;
color:#FFFFFF;
}

  • Author
It's because you've absolutely positioned the content, so it's been removed from the document flow (contradicting the overflow auto).

 

sorted! Thank you my friend! Floats instead :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.