div jumps when seting border

almoplava1

New Member
When a user cliks on a div (see attached screenshots bellow) I'm setting a border with:\[code\]$div.addClass("selected-block");\[/code\]In CSS I have:\[code\]div.selected-block { border: 2px solid #155BCE !important; border-radius:3px;}\[/code\]After the border is set \[code\]top\[/code\] and \[code\]left\[/code\] of text are increased on \[code\]3\[/code\]. How is it possible to avoid this?PS. I thought of making white border for deselected div, but it's not a good solution as white border can intersect black lines.
 
Back
Top