I have a div with WIDTH 100% and position fixed on the top of the page. It covers the vertical scrollbar in IE when vertical scrolling is needed on the html.
What can I do to avoid this (I can't change the position fixed bit)?
Can I detect whether page need vertical scrolling onload/resize and change that static div's width using jQuery?
or
Solve it through CSS altogether?
Found the problem: I accidentally attached overflow:auto
on the body
tag when it was only meant for the html
tag.
It is kinda hard to tell without seeing the page, but could you add a conditional stylesheet and move the div over 5px or so in ie so that doesn't happen?
right:5px
The jquery code for this would be something like:
if ($(window).height() < $(document).height()) {
$('#myDiv').css('left', '5px');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With