Click here to Skip to main content
15,911,315 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all,

scroll bar is coming often , while i mouse over on some specific div, but i have checked with other screens there is no problem as i seen, so anyone could help me to solve this

thanks in advance

Velsamy
Posted
Updated 10-Sep-14 2:31am
v2
Comments
Gihan Liyanage 10-Sep-14 5:09am    
Its is better if you can post that specific divs on here, No people here that they can see your screen.

1 solution

The problem that you're having is a style related issue. When you hover over to some element, the element gets some more borders or paddings or margins. Which causes its size to be changed. In this case, its size enlarges causing the scroll bar to come out.

There are some hacks for this, first one is to make sure the body element always takes up a part of the screen, like this

JavaScript
// set the body's height to be the 100 less than the screen's height..
document.getElementById("body").style.height = screen.height - 100;


..or you can use the CSS to tackle this, and you can make sure that upon any hover event (mouse over) the size of the objects don't change.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900