0

I have a webpage which contains a frame. The frame displays a scrollbar, why?

The code for the file that contain the frame: enter link description here

The code for the file that the frame display: enter link description here

The webpage is this

The problem: I would like to show the whole page without the scrollbar, so that the main page scroll then you would like to see the bottom of the frame :-)

deni
  • 119
  • 1
  • 1
  • 11

1 Answers1

1

The iframe displays a scrollbar because it your content is vertically larger than its default height. In Chrome, the default height appears to be 150px, but it could be anything. An iframe doesn't automatically size to its content.

I question the use of an iframe at all. It should probably be a part of the main page; if it needs to be dynamic, use AJAX or compose the page server-side.

Also note that the <center> tag used multiple times on the page is deprecated. Use CSS instead.

Tim M.
  • 53,671
  • 14
  • 120
  • 163
  • I found iframe the most easy solution :-) – deni Oct 27 '12 at 21:56
  • Is there a way to accomplish this? – deni Oct 27 '12 at 21:57
  • It depends on what you are trying to accomplish. You might update your question to state the problem you are trying to solve (e.g. loading content dynamically, scrolling large content, etc.) – Tim M. Oct 27 '12 at 21:58
  • I have updated the question, or have i misunderstood something? :-) Thanks for the help :-) – deni Oct 27 '12 at 22:06
  • if iframe is the easy solution for you, you have bigger problems then the scroll. using outdated technology, which is not advised in good practices, is kind of.. lame. – Rafael Herscovici Oct 27 '12 at 22:18
  • @Dementic - calling someone lame isn't constructive; pointing them to good practices/information would be more useful. Everyone has to start somewhere. – Tim M. Oct 27 '12 at 22:23
  • @TimMedora - sorry, but i was not calling you lame, i was talking about the method you choose. if you were googling a bit, you would have find out by yourself. http://stackoverflow.com/questions/362730/are-iframes-considered-bad-practice – Rafael Herscovici Oct 27 '12 at 23:11