Jump to content

Window height varies depending on the height of footer

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
toldigabor

toldigabor

    Newbie

  • Members
  • Pip
  • 9 posts
How can I do that if you have a fixed height and width of my DIV, then the underlying footer (also a fixed-width) of the window size vary according to the height of the goal is to completely fill the window.

#2
NastyDevil

NastyDevil

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts
the height of the object you are trying to fill the window with has to use a percentage for the attribute.

#3
toldigabor

toldigabor

    Newbie

  • Members
  • Pip
  • 9 posts
There is a code.
If the content does not reach beyond the height of the DIV to the lower background, the lower the background DIV "stick" to the bottom of the browser (as I wanted).
Unfortunately, when the content DIV is too high you do not. How could this be the problem?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

<html>

 <head>

 <title>Weblap structure</title>

 <meta http-equiv="content-type" content="text/html; charset=utf-8">

 </head>

 <body style="margin: 0; padding: 0; text-align: center">

  <div style="width: 100%; height: 600px; margin: 0 auto; background-color: red;">Large Background</div>

  <div style="position: absolute; left: 0px; right: 0px; bottom: 0px; top: 600px; width: 100%; margin: 0 auto; background-color: yellow;">Lower background</div>

  <div style="position: absolute; width: 700px; left: 0px; right: 0px; top: 0px; margin: 0px auto; background-color: blue">Content</div>

 </body>

</html>



#4
NastyDevil

NastyDevil

    Learning Programmer

  • Members
  • PipPipPip
  • 90 posts
So just to clear it up, you want the white bar at the bottom to always be on the bottom of the browser no matter how low or high you are positioned on the page? If that is what you are trying to do then you need to use javascript. If that is not it please explain it a little better as I tried your code and all i got was a red page with a blue and white bars on top and bottom....

#5
toldigabor

toldigabor

    Newbie

  • Members
  • Pip
  • 9 posts
I would like if the yellow part of touching the very bottom of my browser (the background-color is trasparent, to transparently behind the wallpaper - large background image and lower background image).
The blue part is an essential part of the site where the content is.
The red part is the large background, which is not repeated.
The smaller is the yellow wallpaper section, which repeats itself. This would recur until then, until the blue part lasts.
Unfortunately, when the content DIV is too high you do not.
If you try to reproduce the text in many of the named DIV content, you can not touch the bottom of your browser to the yellow DIV. This is when the blue DIV outreach at the bottom of the yellow DIV.