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 9176947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:13:27+00:00 2026-06-17T17:13:27+00:00

I have one problem with my code and I can’t find a solution. I

  • 0

I have one problem with my code and I can’t find a solution.
I have left sidebar w: 300px h:100% , and I want the right div (content area) to be w: 100% and h:100% with horizontal scrollbar..

But something is wrong in my code and I cannot figure out, the right div is going over the side bar, and if I put margin-left:300px, then they 300px are added on those 100px weight.

I hope you understand me, here’s my code:

HTML:

<div id="wrapper">
   <?php include '../side_bar.php' ?>

    <div id="content">
       <div id="scroll">
        <img src="../images/design1.jpg" width="759" height="565"> 
        <img src="../images/design1.jpg" width="759" height="565"> 
        <img src="../images/design1.jpg" width="759" height="565"> 
       </div>
    </div>
</div>

CSS:

body, html {
    margin: 0;
    padding: 0;
    height:100%;
    width:100%;
}

#wrapper {
    width:100%;
    height:100%;
    display:inline-block;
}

#side_bar {
    float:left;
    width:300px;
    height:100%;
    position:fixed;
    border-right:#000 solid 1px;
}

#content {
    float:left;
    height:100%;
    width:100%;
    position:fixed;
}

#scroll {
    height:100%;
    width:100%;
    display:inline-block;
    position:absolute;
    overflow-x:scroll;
    overflow-y:hidden;  
    white-space: nowrap; 
}
  • 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-06-17T17:13:28+00:00Added an answer on June 17, 2026 at 5:13 pm

    I was able to get the functionality you wanted with the following tweaked CSS:

    body, html {
    margin: 0;
    padding: 0;
    height:100%;
    width:100%;
    }
    #wrapper {
    width:100%;
    height:100%;
    display:inline-block;
    }
    
    #side_bar {
    /*float:left;*/
    top:0;
    left:0;
    width:300px;
    height:100%;
    position:fixed;
    border-right:#000 solid 1px;
    background-color:#333;
    }
    
    #content {
    /*float:left;*/
    top:0;
    left:0;
    height:100%;
    width:100%;
    position:fixed;
    }
    
    #scroll {
    height:100%;
    /*width:100%;*/
    right:0px;
    left:301px; /*Because of border */
    display:inline-block;
    position:absolute;
    overflow-x:scroll;
    overflow-y:hidden;  
    white-space:nowrap;
    }
    

    Hopefully this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one problem with Javascript Nodes.I want to find out what button was
I have one problem that I can't explain. Here is the code in main
More than one time I have encountered the following problem when building code with
I have downloaded follwing code from one of Google Codes but problem is in
I have one problem , I want to get some data from XML file
I have one problem with my iOS Application. I want to play multiple audio
I have one problem with a gridview control and maybe someone can help me.
I have one problem. I have made solution and it is 3-tier application. So
I'm training code problems like UvA and I have this one in which I
I have one problem with parsing *.docx document with OpenXML (C#). So, here's my

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.