开发者

Best practices for a stationary frame at the top of an ASP.NET page?

开发者 https://www.devze.com 2023-04-08 16:29 出处:网络
Wh开发者_StackOverflow中文版at is the best practice for creating a hovering \"frame\" in ASP.NET which will remain stationary at the top of a web page regardless of how the user scrolls vertically?

Wh开发者_StackOverflow中文版at is the best practice for creating a hovering "frame" in ASP.NET which will remain stationary at the top of a web page regardless of how the user scrolls vertically?

For example, if I create a textbox to contain search criteria, I might want the area of that textbox to remain stationary at the top of the browser window, allowing the user to scroll among the results freely and if they wish update their search criteria.


Here is a working example: http://jsfiddle.net/srPPu/2/ (edit: better link)

Using css create an element thats position is fixed on the top of the page (meaning it will not scroll

#search{
    position:fixed;
    width:100%;
    height:25px;
    background:#eeeeee;
    clear:both;
}
#content{
    padding-top:20px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消