Home >Web Front-end >HTML Tutorial >Regarding the problem of fixing the position of the navigation bar, please give advice! _html/css_WEB-ITnose

Regarding the problem of fixing the position of the navigation bar, please give advice! _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:11:371037browse

I have a page with a user control on the left and right. There is a Div in the ascx on the left (navigation bar). The style used is position: fixed. The effect to be achieved is that no matter how the page scroll bar is dragged, My navigation bar is still fixed at the current position. Now this style basically achieves the effect I want, but I found a bug. When I shrink the page, I drag the scroll bar to the right direction. Because of the position of the navigation bar, It is fixed. At this time, the page content will "overlap" with the navigation bar. Have you ever encountered this problem? Please give me some advice on how to solve this bug!


Reply to discussion (solution)

What does the original poster mean by wanting this menu control to always be above the content?

Almost, what I mainly want is that no matter whether the page is dragging the scroll bar up and down or left and right, the left navigation bar will always be fixed in one position, and the page content will not be covered by the left navigation bar when scrolling. . . What do you mean by the original poster, you want this menu control to always be above the content?

I fainted, does anyone know?

Triggered when the page size is changed

$(window).resize(function(){

});

No one understands me What does it mean?

This is looking for js jquery

http://www.cnblogs.com/regedit/archive/2008/03/11/1100170.html

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn