Create two distinct sections on the screen, each with its own vertical scrollbar for navigation

Using Angular.js and Bootstrap 2.3.2, I am displaying a series of thumbnails on the left side of the screen with a larger version on the right. Currently, both sections share one scrollbar which I aim to change by giving each its own vertical scrollbar using CSS without frames.

HTML:

<div class="row">
    <div class="span3">
        <div class="thumbs-list">
            <div infinite-scroll='nextThumb()' infinite-scroll-disabled='busyThumb' infinite-scroll- distance='1'>
                <div class='thumb' ng-repeat='thumb in arrayOfThumbs'>
                    <div class="image-thumbnail">
                        <ul class="scrubber" style="width: 115px; height:auto; padding: 0px;">   
                            <li style="display: block;" ng-click="viewImage(doc)">
                                <a href="#">
                                    <img ng-src="{{thumb.code}}"  alt="" title="Thumb 1"></img>
                                </a>
                            </li>
                        </ul>
                    </div> <!-- END image-thumbnail -->
                </div> <!-- END class='thumb' -->
            </div> <!-- END infinite-scroll -->
        </div> <!-- END thumb-list -->
    </div><!-- END span3 -->

    <div class="span12">
        <div class="images-list">
            <div infinite-scroll='nextImage()' infinite-scroll-disabled='busyImage' infinite-scroll-distance='1'>
                <div class='image-page' ng-repeat='image in arrayOfImages'>
                    <ul class="scrubber-page" >      
                        <li style="display: blockImage;" ng-click="zoom(doc)">
                            <a href="#">
                                <img ng-src="{{image.code}}"  alt="" title="Page 1"></img>
                            </a>      
                        </li>
                    </ul>
                </div>  <!-- END class='image-page' -->
            </div>  <!-- END infinite-scroll -->
        </div>  <!-- END images-list -->
    </div>  <!-- END span12 -->
</div>  <!-- END row -->

CSS:

.thumbs-list {
    margin-top: 95px;
    position: absolute;
    display: block;
    padding: 8px;
    height: auto;
    overflow:auto;
}

.image-thumbnail {
    margin-top:15px;
    height: auto;
    overflow: auto;
    text-align: center;
    padding: 1em 1em;
    border: 1px solid #aaa;
    background: #fff;
    color: #222;
    border-radius: 0px;
    -moz-box-shadow: 3px 3px 10px 3px #ccc;
    -webkit-box-shadow: 3px 3px 10px 3px #ccc;
    box-shadow: 3px 3px 10px 3px #ccc;
}

.images-list {
    margin-top: 95px;
    position: absolute;
    display: block;
    padding: 8px;
    height: auto;
    overflow:auto;
}

.image-page {
    margin-top:15px;
    height: auto;
    overflow: auto;
    text-align: center;
    padding: 1em 1em;
    border: 1px solid #aaa;
    background: #fff;
    color: #222;
    border-radius: 0px;
    -moz-box-shadow: 3px 3px 10px 3px #ccc;
    -webkit-box-shadow: 3px 3px 10px 3px #ccc;
    box-shadow: 3px 3px 10px 3px #ccc;
}

.scrubber-page {
    height:auto;
    width:auto;
    overflow:auto;
}

Answer №1

Have you attempted to define a height and width for your elements and include the following CSS property:

overflow: scroll;

This will result in a scrollbar being added to elements that exceed their defined dimensions.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Difficulty with the Jquery <span> tag on Mozilla 3.6.1

I am currently utilizing jQuery.post to display some data retrieved from a servlet. <div class="Label"> <span id="result" >Click on Check.</span> </div> <script> $(document).ready(function() { $("a").c ...

Incorporate classes into multiple titles by utilizing the text within the title

Here is some HTML code: <tr class="more-options"> <td width="190px" valign="top" class="ms-formlabel"> <H3 class="ms-standardheader"> <nobr>Required Hidden 1&l ...

Is there a way to alter multiple classes using hover effect on a single class without the use of JavaScript, only employing

Hello there! I have a question about applying styles to specific classes when hovering over certain elements. Unfortunately, I am unable to make changes to the HTML files and can only work with the CSS file. Take a look at the image below for reference: ht ...

Ways to prevent background replacement in CSS

Recently I came across this snippet of code: .active { background-color: black; color: white; } span { margin: 10px; } a { text-decoration: none; } .center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .tabButton { margi ...

Adjust the colors of two elements by clicking a button's onclick event

As stated in the title, I have a button in the books component. When this button is clicked, the color of a div within the books component and another div in the navbar component should change. - Below is the code for the books component : export class Bo ...

jquery to create a fading effect for individual list items

I have a group of items listed, and I would like them to smoothly fade out while the next one fades in seamlessly. Below is the code I've been working on: document.ready(function(){ var list_slideshow = $("#site_slideshow_inner_text"); ...

Pop-up modal from Bootstrap appearing on top of the page header

I'm working on a website layout where the header always stays on top of everything. However, whenever I add a bootstrap modal that pops up, it ends up covering the header with a grey area. I've attempted to adjust the z-index values for both the ...

Bootstrap 3: resizing images - why some do and some don't

Using Bootstrap 3, I have encountered an issue with resizing images. Despite both images having the ".img-responsive" class, only the first one is resizing while the second remains the same size. HTML : <div class="container-fluid"> <img src ...

Trouble with FilterBy Feature in Bootstrap-Table

I am attempting to use filtering functionality with a table that is populated via JSON, utilizing bootstrap-table by wenzhixin. HTML snippet: <button class="btn btn-primary" id="filterBtn">Filter</button> <div class="container"> &l ...

The Bootstrap 5 gem caused a production build error on Netlify

After cloning a repository, I started using Jekyll 4 and integrating the Bootstrap 5 gem from this repository. The project works fine locally, but runs into issues in the production environment. I am hosting the site on Netlify and noticed that the build ...

Distinctive design for three different list items

Currently working on a project that involves the use of ul and li elements. I need to change the background for every 3rd li element in alternating patterns. Since the li elements are generated from the backend, I do not know how many there will be. I at ...

Creating mobile-friendly websites for a variety of devices, including smartphones and tablets

Creating a prototype webpage for my friend, one crucial aspect is ensuring it looks good on different devices. Utilizing Bootstrap, I've implemented vertical collapsing for certain elements, but I'm struggling with how to adjust other components ...

The reason for the lack of auto complete functionality in this specific Bootstrap example remains unclear

I've been attempting to implement an auto-complete dropdown feature with dynamic data, but I'm facing an issue where no suggestions are displayed in the dropdown. I found this example on Datalists: https://getbootstrap.com/docs/5.1/forms/form-con ...

Different Types of Web Navigation Menus and Common Implementation Strategies

Are there recognized Navigation Menu designs for creating interactive navigation menus with dropdown panels on a Website? For instance, when you click on the StackExchange link at the top left, a panel with content appears, and when you click on your User ...

Graphical user interface already constructed for importing .csv files and inserting information into a MySQL database

Looking for a plugin that can assist me in transferring a .csv file to a mySQL database. Initially, I was planning on creating this functionality myself but I believe that the necessary code may already exist. Below, you will find a detailed description of ...

Transform the given string into an array by eliminating all instances of the plus symbol

I need help converting strings into an array by removing the "+" characters. Currently, it is only converting the first element and not all of them. Can you assist me in converting all instances of "+" to "," for every element? let myString = 'jan + f ...

Tips for showcasing mistakes when submitting a form

I am curious about how to show the error message from my model in the validate() function if the submit is not valid, returning "invalid username or password" index.scala.html @(myForm: Form[models.profile.MUser]) @import helper._ @import helper.twitter ...

Creating a custom variable assignment in Bootstrap within the custom.scss file

I've been searching for a solution to this problem for half a day now. My goal is to change the value of the $primary variable from the default $blue to the $orange variable. I tried following the instructions in the documentation: $primary: red; @imp ...

Removing margins from the footer and header after adding a video background: A step-by-step guide

After implementing a video as the background of my HTML project, I noticed some margins appearing on the right side of the header and footer. Despite following advice to set "margin: 0" in my CSS for the Body element, the issue persists. You can view the ...

Using CSS to center the div and align its son on the left

I am struggling to align the elements in my HTML and CSS prototype. This image shows what I am trying to achieve. I attempted to use display: flex and justify content: center to center the main div. However, I encountered difficulties in positioning the p ...