0

I have a site with a fixed footer at the bottom of every page. The content area above the footer has a appropriate margin to ensure that content does not hide behind the footer when scrolling down.

However, when a simple text search if performed in the browser (firefox) the search term is usually hidden behind the footer as the page normally (without the footer that is) scrolls to just bring the search term into view.

How can I work around this issue?

I have one idea in mind: Make the content area of a fixed height (browser viewport height - footer height) and give it a scroll instead of the browser. Not the best solution but that is an option. What would be the drawbacks to this option?

4

1 回答 1

0

我之前在自己的一个项目中就注意到了这一点,但是,这个小小的不便真的足够重要,足以让您更改页面的布局吗?我不会仅仅因为它不必要地增加了代码的复杂性而建议您正在考虑的修复程序,并且用户体验可能会受到影响(比您描述的问题要严重得多)。

我就顺其自然吧。

于 2009-05-12T19:06:53.247 回答