• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Embedding SVG in HTML or XHT... > Adding Scroll Bars to SVG Web Pages

Adding Scroll Bars to SVG Web Pages

One of the disappointments of the Adobe SVG Viewer, at least for me, has been the omission of scroll bars (still missing as of version 2.0) when SVG images are displayed on their own as Web pages (see Chapter 12, “Creating a Simple SVG Web Site”). That omission contrasts with the many successes of the Adobe viewer. However, overcoming the omission is simple: Use the HTML <embed> element to provide scroll bars for a large SVG image, as Listing 10.3 shows.

Listing 10.3. (ScrollBars01.html)

<html> 
 <head> 
  <meta http-equiv="content-type" 
content="text/html;charset=iso-8859-1"> 
  <title>An SVG Web Page which seems to 
have scroll bars!</title> 
 </head> 
 <body leftmargin="0" marginwidth="0" 
topmargin="0" marginheight="0"> 
    <embed src="NestedSVG.svg" width="1000" 
height="800" 
     type="image/svg+xml"> 
 </body> 
</html> 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint