1

I'm doing an horizontal calendar. I was testing something today and I'm wondering if it's a bug or if it's really a limitation of the browser.

In short, I'd like to have an infinite width. The calendar is within a div and would overflow to infinite.

After inserting a really big range, I realized that my width was actually 0px. Then after searching. I found to width with strange behavior.

  • 35791375px px width is 0px
  • 35791374px background disappear
  • 35791373px div displays correctly

And was wondering actually what would be the actual maximal width that would work across all browsers. These numbers are quite strange. They are not factors of 8.

Here is a sample markup.

<div class="calendar" style="overflow: hidden; width: 1000px;">
   <div class="scroll" style="width: 35791375px;">
       <div class="month">...</div>
       ...
       <div class="month">...</div>
   </div>
</div>
Loïc Faure-Lacroix
  • 13,220
  • 6
  • 67
  • 99
  • I can't help you with the numbers(I do remember having read about it a long time ago, so some numbers exist) but I might be able to help to find a solution. Is there supposed to be content to infinity or what's the goal here? Just a huge scrollbar? – René Oct 31 '12 at 14:41
  • 1
    It probably changes from browser to browser. What browser are you using? – Yehuda Shapira Oct 31 '12 at 14:50
  • chrome but yeah infinite scroll is the goal while 30000000px; should be enough. Unlikely that someone will ever scroll to that point. But if that number is too high for other browsers, I'll have to use the smallest one of every major browsers. It's pretty much a theoritical question than a real problem. – Loïc Faure-Lacroix Oct 31 '12 at 14:56

1 Answers1

0

I think you'll find your answer here:

Browser limitation with maximum Page length

Basically, there's a limit to the amount your browser can display.
...And by the way, 35791375 pixels is about 7.5 miles.

Community
  • 1
  • 1
Yehuda Shapira
  • 8,460
  • 5
  • 44
  • 66