Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5936857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:27:26+00:00 2026-05-22T15:27:26+00:00

I have a huge SVG file inside a DIV. I would like to scroll

  • 0

I have a huge SVG file inside a DIV. I would like to scroll the SVG inside the div by clicking on a A link.

My problem is that I would like my DIV to stay smaller than my SVG document, so I can have active scrollbars.
Let’s say my SVG document’s height is 10.000 and 1.100 width, inside a 200px x 100px DIV element. But whatever I do, my DIV element gets as big as the SVG. How can I restrain the size of my div ?

Here is my code:

<html>
<title>
YOP
</title>

<head>

<style TYPE="text/css"> 
<!--
  div.header{

background:black;
background-color: #ededed; 
margin-top: 0px;
position: fixed;
top: 0px;
//width:100%;
width:1100px;
height: 500px;
   }

 -->
 </style>


<script type="text/javascript" >        
      var pos = 0;

       function  MyFtion(){
       var elem = document.getElementById('aSVG');      

       pos = pos + 100;
       elem.scrollTop = pos + 100;
       window.scroll(0,   pos);

      }
 </script>
 </head>

 <body bgcolor="white" >

        <div class="header" id="MyDiv2">
        <a href='javascript:MyFtion()'>** Move s**</a> 
        </div>


    <div id="oo"  height="200px" width="100px" style="margin-top:100px;overflow:scroll;" >          
            <object id="aSVG" data="out.svg"  style="margin-top:100px;overflow:hidden;" /> 
    </div>


  </body>
 </html>

Note that I tried to add display:block; to the style of my OBJECT tag but doesnt work.

Thanks for helping,

Antoine

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:27:27+00:00Added an answer on May 22, 2026 at 3:27 pm

    Sometimes the height and width HTML attributes don’t work well with CSS, so try using the CSS equivalents.

    #oo{
      height:200px;
      width:100px;
      margin-top:100px;
      overflow:scroll;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge checkbox list with different levels and I would like to
I have huge table with 1 million records, i would like to modify some
I have huge file (17 million lines) that contains content in this format: AB101XG,57.144165160000000|,-2.114847768000000|;
a. i have a huge SVG file 2. i have objects in the SVG
I have a huge java codebase (more than 10,000 java classes) that makes extensive
I have a huge text file and I wanted to write a program which
I have a huge C file (~100k lines) which I need to be able
I have huge text file of such format: aaa bbb 1 aaa ccc 2
I have a huge XML file (114 KB/1719 lines; see the error message below
I have this huge data frame that has servernames, Date, CPU, memory as the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.