I want to create a horizontal banner with centred text for usage on a public website using Inkscape. How to make the SVG size identical to the background rectangle size and the text centred within this?
I tried to do so via a background rectangle with the text aligned (using the "align and distribute" options). This did not work, apparently the "flowed text only shows up in Inkscape" and is not supported by SVG. The text is not always centred on my responsive bootstrap based website.
I have now applied a background filter as per this advice. This also converts the text to path. This works well except for the fact that there seems to be some white space at the right side of my text within the SVG . Due to this, the banner as a whole is not centred at the page, the text is centred within the part of the SVG that has a background color (that I put there using the filter in stead of using the rectangle). How do I remove this?
Screenshot of the SVG open in Chrome:
I have resized my page to the selection, set the viewbox to "0,0,100,100", cleaned the SVG, saved as plain SVG,... but no solution yet.
This is the intention, but this is a .jpg image, the SVG is more to the left with a lot of whitespace at the right of the image:
This is the SVG:
<svg
width="344.65631"
height="40.42527"
viewBox="0 0 344.65631 40.42527"
version="1.1"
id="svg5"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB"
id="filter11628"
x="-0.029999999"
y="-0.050000001"
width="1.0599999"
height="1.13">
<feFlood
result="result1"
flood-color="rgb(0,0,0)"
flood-opacity="1"
id="feFlood11616" />
<feImage
xlink:href=""
result="result2"
id="feImage11618" />
<feBlend
result="result4"
in2="result1"
mode="multiply"
id="feBlend11620" />
<feMerge
result="result3"
id="feMerge11626">
<feMergeNode
in="result1"
id="feMergeNode11622" />
<feMergeNode
in="SourceGraphic"
id="feMergeNode11624" />
</feMerge>
</filter>
</defs>
<g
id="layer1"
transform="translate(157.26282,153.55087)">
<g
id="g1185"
transform="translate(-62.108309,-238.85639)">
<g
id="g11059"
style="filter:url(#filter11628)"
transform="translate(-50.165302,17.705401)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.9333px;line-height:0;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="-36.136013"
y="85.338234"
id="text11799"><tspan
id="tspan11797"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.9333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;stroke-width:0.264583"
x="-36.136013"
y="85.338234">SAMEN IN ACTIE VOOR <tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.9333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#f7cc26;fill-opacity:1"
id="tspan34400">OEKRAÏNE</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:16.9333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="13.758512"
y="104.90711"
id="text1708"><tspan
id="tspan3424"
x="13.758512"
y="104.90711"><tspan
style="fill:#f7cc26;fill-opacity:1"
id="tspan7140">GEEF NU</tspan> VIA GIRO 555!</tspan></text>
</g>
</g>
</g>
</svg>