Thanks for the help guys. I tried the tspan and it works prefectly in IE/ASV and Opera 9, but alas not in Firefox 1.5. With the <a> tag in place the link does not display at all. Removing the <a> tag makes the link text visible but the onclick does not fire. Firefox does have known problems with <a> and <tspan> so I think this is the correct solution, once Firefox supports it :-)
I will have a fiddle with getComputedTextLength and text-anchor later. Richard --- In [email protected], "krugerboy1971" <[EMAIL PROTECTED]> wrote: > > Richard > > Also, consider using text-anchor="end" on the first piece of text... > > --- In [email protected], Erik Dahlström <ed@> wrote: > > > > On Wed, 13 Sep 2006 14:41:24 +0200, richard_smith_ons > > <Richard.M.Smith@> wrote: > > > > > I have a problem with texts. Using the Adobe Viewer the SVG below > > > displays the "click here" link neatly in front of the preceding > text > > > regardless of the size of the browser window. However using > Firefox > > > 1.5.0.6 or Opera 9.0.1 the gap between the two texts varies (can > > > overlap) according to the size of the browser window. Any > > > suggestions? > > > > How about using 'tspan' instead of making absolute- > positioned 'text' > > elements? > > If you want to start the text on some absolute x coordinate then > make sure > > the text in front is as long as you think it is (using SVG DOM > > getComputedTextLength() for example). > > > > And 'startOffset' isn't valid on 'text' elements, so you can > remove that > > too. > > > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE svg> > > <svg id="containerSVG" version="1.1" baseprofile="full" > width="100%" > > height="100%" zoomAndPan="disable" viewBox="0 0 1000 600" > > xmlns="http://www.w3.org/2000/svg" > > xmlns:a3="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" > > xmlns:ev="http://www.w3.org/2001/xml-events" > > xmlns:fo="http://www.w3.org/1999/XSL/Format" > > xmlns:xlink="http://www.w3.org/1999/xlink" > > preserveAspectRatio="xMidYMid meet"> > > <g id="areatext" visibility="visible"> > > <text x="500" y="319" id="profile1" font-size="12px" > > font-family="Arial">Local Authority:</text> > > <text y="319" id="profile2" font-weight="bold" font- > size="12px" > > font-family="Arial" x="585">Fareham</text> > > <text x="500" y="333" id="profile5" font-size="12px" > > font-family="Arial">in Region:</text> > > <text y="333" id="profile6" font-weight="bold" font- > size="12px" > > font-family="Arial" x="585">South East</text> > > <text x="499" y="352" id="profile7" font-size="12px" > > font-family="Arial"> > > To view indicators available at Super Output Area Lower > Layer <a > > xlink:href=""> > > <tspan fill="blue" id="profile8" onclick="alert ('hello')" > > text-decoration="underline" > > font-size="12px" font-family="Arial">click > here</tspan></a></text> > > </g> > > </svg> > > > > Hope this helps > > /Erik > > > > -- > > Using Opera's revolutionary e-mail client: > http://www.opera.com/mail/ > > > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

