A fixed-height div with scrolling capability within a bootstrap column

I am new to CSS and hoping this issue is a simple one. Imagine I have a responsive, two-column Bootstrap 3 grid layout. In the left column, I want it to always fill the height of the browser window. However, within that column, I need a scrollable div to display content that is longer than the column itself.

Does that make sense? My attempts so far have resulted in the longer div dictating the height of its container, causing the entire window to scroll vertically.

Answer №1

Why not give this a shot?

<div class="row">
  <div class="col-lg-6">
    <div class="col-lg-6" style="
      height: 100%;
      overflow: scroll;
    ">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
      <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
    </div>
  </div>
  <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
    <img src="http://placehold.it/650x250" alt="..." class="img-rounded img-responsive">
  </div>
</div>

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

Using the jquery stop() function will halt any ongoing hover effects from being applied

I am currently experiencing a problem with the code found on http://jsfiddle.net/eSbps/. This specific code pertains to a menu system that reveals second levels when hovering over the top levels, using slideDown('slow'). To prevent queuing effe ...

Responsive design in Bootstrap(-Vue) with compact input fields

I am currently working on creating an input form with small fields and signs between them. https://i.sstatic.net/THjhs.png Right now, I am using a combination of classic HTML and Bootstrap-Vue, as shown in the screenshot. It is functional, but the issue ...

Sass Alert: The mixin called roboto-family is missing from the stylesheet. Trace: Problem detected in src/pages/forms/forms.scss at

Greetings, I am diving into the world of Ionic for the first time. Recently, I embarked on a new project in Ionic and decided to integrate a theme. To do so, I copied an .html file, an .scss file, and also created a .ts file. Forms.html <!DOCTYPE html ...

Modify the buttons in the Angular Material Nav-bar according to the current page

I've utilized Angular Material to design my navbar in the app.component.html page. Initially, it features a LOGIN button which should be hidden once the user successfully logs in. Current method: I'm currently disabling the login button based on ...

Enigmatic void appears above row upon removal of content from a single item

When I click on an item in my grid, the content of that item is moved to a modal. The modal functions properly, but I noticed that when the content is removed from the item, a space appears above it. I have found that using flexbox could solve this issue, ...

Is there a problem with css3 opacity transition in Webkit browsers?

While exploring alternative ways to modify the Bootstrap 3 carousel, I stumbled upon a technique that achieves a 'fade' effect instead of the usual 'slide'. However, in webkit browsers, the transition may appear choppy or flicker betwee ...

Determining the precise margin within a nested div structure

Hopefully, my description of a "nested div" was accurate. My current situation involves an image within a div structured like this: content -> content-inner -> column_left I'm struggling to start the image at 0 px (the extreme left side of th ...

Content in Slider Exceeding Container Bounds

After successfully creating a slider using jQuery with the help of some Stack Overflow users, everything was working perfectly. However, when attempting to change the layout of the slider, it somehow broke and now all slides are being pushed out of the con ...

The span exits the external div only once the animation has concluded

I utilized jQuery to create an animation effect: http://jsfiddle.net/rxCDU/ UPDATE: Please note that this effect is optimized for Chrome browsers! The animation works correctly, however, the green SPAN element moves out of the red DIV only after the ani ...

Utilizing JQuery to modify CSS in a partial view

My layout includes a button and a dynamically filled div below it using ajax and a partial view. Here is the code related to the button: $(document).on('click', '.btn-release', function () { StartReleaseVersionEdit(); ReleaseV ...

When I try to hover my mouse over the element for the first time, the style.cursor of 'hand' is not functioning as expected

Just delving into the world of programming, I recently attempted to change the cursor style to hand during the onmouseover event. Oddly enough, upon the initial page load, the border style changed as intended but the cursor style remained unaffected. It wa ...

Customizing the Mui Theme in a Unique Way

After generating an MUI component from Mui DatePicker, I encountered the following code: <span class="my-theme-MuiTypography-root my-theme-MuiTypography-caption my-theme-MuiDayCalendar-weekdayLabel css-1mln09i-MuiTypography-root-MuiDayCalendar-week ...

enclosing the pre tag within a table cell

Despite using the latest Twitter Bootstrap, I am facing some issues with pre tags inside table cells. When a line is too long, it should create a horizontal scroll, but unfortunately, that does not happen. Check out this example without using the pre tag. ...

Utilizing Blurred Images in the Header

I want to create a blurred background image with text and buttons on top of it, but the blur effect is also affecting the text and buttons. I'm not sure how to keep them separate. header { background: url("street-238458.jpg") no-repeat center; ...

Arranging Boxes side by side

I am struggling to align three boxes horizontally on my website, as they are currently stacking vertically. I have implemented Twitter Boostrap's 'row' class in an attempt to achieve this layout. HTML: .img-box-kai { width: 300px ...

Tips for aligning content vertically within a header:

I'm currently working on creating a responsive header with two columns. My goal is to have the button in the right column vertically centered. I am aware of the method for centering items using 'top: 50%; margin-top: -xy px', but my button ...

I'm having trouble getting my jQuery to connect with my HTML, no matter what I do

UPDATE: Thank you everyone, I finally figured out that it was the API causing the issue. Even though I downloaded the files to avoid server requests, I will switch to using https instead. I have a couple of questions. Why isn't my code functionin ...

Importing usernames and passwords from a .txt file with Javascript

I'm in the process of creating a website that includes a login feature. The usernames and passwords are currently stored within the website files as .txt documents. I am aware that this method is not secure, but for the purpose of this project, I want ...

Creating a JavaScript-powered multi-department form: A step-by-step guide

Is there a way to maintain the form displayed on a webpage created in HTML5 and JavaScript for logging calls across three different departments? With buttons assigned to each department, clicking on them reveals the respective HTML form. That said, every t ...

What could be causing the movement of my main navigation links when hovering over another top-level element?

I am struggling to pinpoint the origin of a particular issue I am encountering with my menu. The problem arises when I hover over a top-level element, causing all elements below it to shift to the right: (Take note of the top-level elements being affected ...