sandyd
October 4th, 2012, 06:04 AM
When I restarted the design of my site, I added a fixed header that scrolled down with the page.
However, it is currently turning out to be (quite) the nightmare. I wanted to create snappable divs (scroll section by section using jquery), so I set the height of each panel to 100%.
Of course, the floating header took up space as well (66px+2px border), so I was forced to use negative margins to make sure that the stuff did not get hidden under the header, and instead have a height equal to the space between the end of the header and the browser window. The divs now overlap, which is not a problem, as I am setting a solid background later on. Now, everything worked, and each slide fit perfectly between the header and the bottom of the screen.
It worked quite well, until I added the slider.
Take a look: http://dev.sandyd.me/~sandyd/
The slider refuses to stay within the div, and starts overlapping the next section.
Any ideas?
Note that I could force the height to 80% or something by using
.dwuserEasyRotator {
height: 80% !important;
}
, but I would prefer something that covers that entire section fluidly (if you resize the page right now, each of the sections will still fit between the header and the bottom of the browser window.
However, it is currently turning out to be (quite) the nightmare. I wanted to create snappable divs (scroll section by section using jquery), so I set the height of each panel to 100%.
Of course, the floating header took up space as well (66px+2px border), so I was forced to use negative margins to make sure that the stuff did not get hidden under the header, and instead have a height equal to the space between the end of the header and the browser window. The divs now overlap, which is not a problem, as I am setting a solid background later on. Now, everything worked, and each slide fit perfectly between the header and the bottom of the screen.
It worked quite well, until I added the slider.
Take a look: http://dev.sandyd.me/~sandyd/
The slider refuses to stay within the div, and starts overlapping the next section.
Any ideas?
Note that I could force the height to 80% or something by using
.dwuserEasyRotator {
height: 80% !important;
}
, but I would prefer something that covers that entire section fluidly (if you resize the page right now, each of the sections will still fit between the header and the bottom of the browser window.