Fixed position and 100% width of an element spanning a vertical scrollbar in IE

I have a div with WIDTH 100% and the position is fixed at the top of the page. It covers the vertical scroll bar in IE when vertical html scroll is required.

What can I do to avoid this (I cannot change the fixed bit of the position)?

Is it possible to determine if the vertical scroll page needs onload / resize and change this static div width using jQuery?

or

Solve it completely with CSS?

+5
source share
2 answers

: overflow:auto body, html.

+8

, , div 5 .., .. , ?  right:5px

jquery :

if ($(window).height() < $(document).height()) {
   $('#myDiv').css('left', '5px');
}
+1

All Articles