Tips on creating fixed size wells in Bootstrap

In my current situation, I am looking to set a fixed size for my map within a well.

Here is the link to a jsfiddle: https://jsfiddle.net/x4gM4/36/ (please scroll to see what I have attempted).

I have already tried the code provided in the jsfiddle. Can someone please assist me in making my map maintain a fixed size?

This is my main div structure:

<div class="row"> <!-- start of row -->
   <div class="col-sm-6">
         <div class="well"> 4 images go here </div>   
   </div>

<!-- google map goes here, which I want to be fixed -->
   <div class="col-sm-6">
        <div class="well">
          Google Map
        </div>
    </div>
</div> <!-- end of one row -->

Question: How can I make the google map well remain fixed when scrolling through the images?

Please adjust the jsfiddle to match the size shown in the image below.

https://i.sstatic.net/GD4Ez.png

Your assistance is greatly appreciated. Thank you in advance!

Answer №1

It seems like this is the solution you're looking for.

div.sticky-map {
  position: relative;
}
div.sticky-map > div.box {
  position: fixed;
}

Check out the updated JSFiddle here

Answer №2

To achieve the desired effect, use position: fixed

#map-canvas {
  height: 100%;
  width: 300px;
  background-color: #CCC;
  position: fixed;
  right: 0;
  top: 0;
}

It is important to note that when setting the right and top positions, they should be relative to the entire window, not just the parent 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

The H1 heading sets the stage, layered behind the captivating background image

I'm having trouble getting the h1 header to stand out over a background image with a box-like color for the header. Every time I make changes to the h1, they seem to be hidden behind the background image and only briefly show before being covered up. ...

Checking if the Cursor is Currently Positioned on a Chart Element in Word Addin/OfficeJS

I am looking for a way to determine if the document cursor is currently positioned inside of a Chart element using the Microsoft Word API. My current application can successfully insert text, but when I attempt to insert text into the Chart title, it ends ...

The hamburger menu for mobile devices is not functioning properly on the website's mobile version, however it operates correctly when the screen is resized

Currently, I am facing an issue with the hamburger menu not responding on my mobile device. Oddly enough, it does work when I resize my browser window to mimic a mobile size. There seems to be a glitch happening, but I'm struggling to pinpoint the exa ...

Create a button within a dataTables column based on the column's value

Utilizing datatable to display columns and rows from a JSON file, where the data variable contains the JSON data. "columns" : [ { "data" : "id" }, { "data" : "username" }, { "data" : "email" }, ...

The functionality of the jQuery button does not seem to be functioning properly when placed before

My jQuery code seems to be ignoring the button generated by PHP if the php is done inline. This is the code snippet that is causing issues: $('button').click(function(){ alert("CLICKED"); var btnNum = $(this).attr('value'); $(this).a ...

Load information into a different entity

I need help with adding new values to an existing object. When I receive some form data from noteValue, I also have additional input data in my component under person that I would like to integrate into noteValue before saving it. let noteValue = form.va ...

Combining HTML pages with Laravel framework

I successfully integrated an HTML template with multiple pages into my Laravel project. The main page is functioning properly, but I am encountering issues when trying to navigate to the other HTML pages through links on the main page. However, typing the ...

Having troubles with the background in AngularJS? Experiencing a significant space between the background and footer? And resizing images is not making

Hey there, I've been trying to add a background image to my AngularJS website, but I'm facing some challenges. I have followed several tutorials and examples that work, but I specifically want the background image to be placed at the bottom of th ...

Transition the background image color smoothly from left to right in a seamless and continuous movement

A switch button located in the top right corner can toggle between light and dark modes. The background features a zoomed-in image. Currently, the transition is as follows: From left to right when switched to dark mode From right to left when switched to ...

Incorporating Twitter Bootstrap into your Zend Framework 2 Navigation Menu

I have successfully created a menu from my database and the code is functioning perfectly. Now, I'm looking to enhance the menu's style by incorporating Twitter Bootstrap, but I'm encountering some difficulties in doing so. Is there anyone k ...

The JS copy function is successful when operating on a single element, but it encounters issues when attempting to run on multiple elements, only copying

My code includes a copy function that copies the data from a textarea to the clipboard when a button is clicked. The functionality works perfectly for the first textarea, but for subsequent textareas, the buttons do not perform the copy action. Check out ...

"Issues arise when trying to use a Javascript button in conjunction with Bootstrap 4

When creating dynamic divs on a modal form with a close button to destroy them, everything was working fine. However, when I added a button to add new divs/forms items, the close button callback was not being triggered and instead closed the modal without ...

Does Google's web crawler have the ability to index content created by javascript?

Our web app generates content using javascript. Can Google index these pages? In our research on this issue, we primarily found solutions on older pages suggesting the use of "#!" in links. Within our app, the links are structured as follows: domain.co ...

Creating a Custom "Save As" Dialog in HTML5 and JavaScript for Downloading Files

I have developed a NodeJS/Express application that is capable of generating and downloading an Excel document (created using ExcelJS) when a user clicks on a button. Currently, the file gets automatically downloaded to the default download location of the ...

Ways to extract information from a table cell located next to a table cell with colspan

As a beginner in web scraping, I am gradually making progress. However, I'm facing a tough challenge with this particular task. My goal is to extract data from the ESPN NBA boxscore website: I aim to scrape the names of players labeled as "DNP" (Did ...

Tips for incorporating css @keyframes within a cshtml file:

My cshtml page includes a Popup that I created, but I encountered an issue with keyframes. When I tried to use it without keyframes, the fade effect was lost. I am looking for a way to fix my @keyframes. (I tested the code on Chrome and Opera) I found the ...

Modify the standard width setting in my css file

I'm looking to adjust my default width in the CSS file so I can incorporate an HTML5 animation on my website. Here's what I've placed on the site: <div id="nakuru_hype_container" style="margin:auto;position:relative;width:100%;height:33 ...

JavaScript generates fresh arrays according to specific criteria

I have arrays containing old and entity data: var old = [ { "id": 3, "entity_type_id": 1, "product_id": 4, "name": "test1", "acreage": 100, "yield": 20, "worth": 30 }, { "id": 4, ...

Struggling to extract specific data from a table using angular.js

My table includes Roman numerals (i.e. I, II, III, ......VIII) for filtering using Angular.js. However, I am facing an issue where the filtration process works for some values but not for others. Please review my code below: subject.html: <table cl ...

What is the best method to save a screenshot to your local drive without any annoying pop-ups?

I am looking to save a screenshot locally without displaying a download popup. (function() { 'use strict'; $("body").prepend(` <button id="btCapture">SCREENSHOT</button> <input type="sub ...