deni
deni

Reputation: 119

Why does frame use scrollbar?

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 :-)

Upvotes: 0

Views: 63

Answers (1)

Tim M.
Tim M.

Reputation: 54377

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.

Upvotes: 1

Related Questions