XML technologies / SVG / Creating simple SVG graphics / Creating and formatting simple text / Grouping and formatting text
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
The navigation bar texts still need formatting. The easiest way is to enclose the individual text elements belonging to each navigation bar between the tags <g> and </g>. This defines an element group that you can format uniformly with a single style attribute for the group. Extend the source code as follows:
<g id="vertikal" style="font-family:'Arial Black',Helvetica;font-size:12;fill:rgb(0,0,0)">
<text x="10" y="230">Was ist SVG?</text>
<text x="10" y="260">SVG FAQ</text>
<text x="10" y="290">Links</text>
<text x="10" y="320">Beispiele</text>
<text x="10" y="350">Editoren</text>
<text x="10" y="380">Viewer und Tools</text>
</g>
<g id="horizontal" style="font-family:'Arial Black',Helvetica;font-size:12;fill:rgb(0,0,0)">
<text x="290" y="115">Kontakt |</text>
<text x="361" y="115"> Impressum |</text>
<text x="452" y="115"> Ziel der Seite |</text>
<text x="554" y="115"> Weitere Projekte</text>
</g>
Note:
After formatting, you may need to adjust the text positions in the horizontal navigation bar. This depends on the font and size you chose.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top