How to create a CSS HTML page with header, footer and content

There are 3 parts on the page.

  • A title that has unknown content at design time because it is filled with text at run time. All text should be displayed, no scrollbars (I think height: 100%it does)

  • Content, content should fill the page below the bottom of the header to the top of the footer. if there is more text in the content that can be displayed, then scrollbars should be available.

  • Footer The footer should be 25pxtall and always sit at the bottom of the viewport.

A window is a pop-up window and should never have window scrollbars, it can be changed, but no scrollbars. Content scrollbars should be the only ones available.

The content area should change when the window is resized, but the footer remains unchanged, that is, it is fixed at the bottom.

All widths will be 100%

+1
source share
2 answers

Title: do not indicate height. Divs will automatically match the size of the content

Content: specify the bottom edge: 25 pixels to avoid overlapping the footer

Footer: Position: Fixed; height: 25px

You will need to learn ways to simulate the position: fixed for IE <7. see, for example,

, IE 6?

+2

, . , -, - , , - .

... , , ( , ), 1 Javascript Window.Height, (, ).

CSS, . CSS, ...

+2

All Articles