Strange scrollbars around the svg background in chrome Strange scrollbars around the svg background in chrome google-chrome google-chrome

Strange scrollbars around the svg background in chrome


Look inside the original svg file with any text-editor. If you have any anchor points placed on half pixel, move them to the closest pixel. When you export the SVG, make sure the size of the document is round pixel (ex: 100px), not half pixel (ex 100,49px).

The problem is that if you have a document with half pixel anchor point near the edge of the file, webkit will round it to the closest pixel, and thus think that you have anchor points outside the document, and that will create the fixed scrollbar.


In chrome the image seems slightly too big for the container.

Just add

overflow:hidden;

to the container in the CSS, this should stop scrollbars, either that or make the container slightly bigger.


I have also noticed that upon examination of the SVG there may be an overflow value set. However if you remove this value, add enable-background, and make sure the SVG is rounded up or down and does not use a decimal point, it does fix the scroll bar issue in Chrome.

Try replacing:

overflow="scroll" xml:space="preserve">

with

enable-background="new 0 0 1200 581" xml:space="preserve">