display bootstrap on top of screen, not on top of page - twitter-bootstrap-3

I have a very long page and when I open a bootstrap modal from the bottom of this page the modal is displayed on top of page not on top of the screen. So the user has to scroll up in order to see the modal.
How can I change this behavior?

You have got the result after adding below style sheet in your css.
yourselector {
position: fixed;
top: 50px;
bottom: 50px;
left: 50px;
right: 50px;
}

Related

Rendering error safari tilt.js over fixed element

There is a view (only on Safari) error when tilt object is over a fixed element.
https://codepen.io/imagica/pen/zYPYbbJ
.header{
height: 100px;
width: 100vw;
background: red;
position: fixed;
}
any ideas how to fix this?
Marco

How to increase clickable area surrounding a Vuetify v-slider's nob?

How do you increase the clickable area surrounding the nobs of Vuetify's v-slider component?
I would like to do this in order to make it easier for users to 'grab the nob' and control the slider, particularly for the sake of mobile UX.
Here is a method to increase the clickable area of the draggable v-slider and v-range-slider nobs using CSS. It should be noted that, as of February 2021, v-slider and v-range-slider do not yet have built-in props to control this functionality.
My answer is based on this github comment (note: it is worth reading this entire github issue thread, as it concerns the OP's question).
<style scoped lang="scss">
.my-slider-class >>> .v-slider__thumb:after {
transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
content: '';
color: inherit;
width: 400%;
height: 400%;
border-radius: 50%;
background: transparent;
position: absolute;
left: -150%;
top: -150%;
}
.my-slider-class >>> .v-slider__thumb:before {
transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
content: '';
color: inherit;
width: 200%;
height: 200%;
border-radius: 50%;
background: currentColor;
opacity: 0.3;
position: absolute;
left: -50%;
top: -50%;
transform: scale(0.1);
pointer-events: none;
}
</style>

How do I position the button container at the bottom of a draggable modal box in react-native?

I have a modal box which has some content and at the bottom a button container which has two buttons. I want the button container to be always relative to the screen / viewport. Now the tricky part is the modal box is draggable. I can move it up and down but the height remains 100%.
Now if I give position:absolute;bottom:0 to the button container, it sticks to the bottom of the modalbox. but when I push the modal downwards, the button container also gets pushed down.
How could I achieve positioning this always at the bottom of the screen regardless of the movement of modal ?
const ButtonContainer = styled(View)`
align-items: center;
justify-content: flex-end;
flex-direction: row;
position: absolute;
bottom: 0;
right: 0;
left: 0;
`
const Container = styled(View)`
padding-left: 15;
padding-bottom: 60;
padding-right: 15;
padding-top: 15;
height: 100%;
`
<Container>
<ScrollView>
{content}
</ScrollView>
<ButtonContainer>{buttons}</ButtonContainer>
</Container>

Set Leaflet map to height: 100% of container

Please how can we set the map div to be height: 100% of its container?
I have tried this within a bootstrap template content section, but all I get is height of 0px. Even Google-Dev tools shows #map height as 0px.
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
}
Set
#map{
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
and give its container position: relative.
The above answer didn't work for me, but this did:
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
width: 100%;
}
..from A full screen leaflet.js map
Leaflet needs an absolute height, and height: 100% only refers to the height of the parent element - if this isn't set, it will default to 0.
If your map is the only element in the body, use height: 100vh to match the height of the viewport (Example).
If your map is inside a container, set height: 100vh on the container (or other desired height) and height: 100% on the map element (Example).

Invisible scrollbars on a position:absolute div on Safari 5 for Windows

I have a single div element in a page styled as follow:
div {position: absolute; width: 340px; height: 480px; overflow-y:scroll}
I use a simple jquery script to center it in the available width and height on window.resize event.
The div is displayed and works perfectly on Safari 5 for Mac.
On Safari 5 for Windows it works perfectly (i can scroll the content using the mouse wheel) but the vertical scrollbar is not rendered.
Any idea?
Thanks in advance.
There's no need to use jquery to center, just use the following:
div {
position: absolute;
width: 340px;
height: 480px;
overflow-y: scroll;
top: 50%;
left: 50%;
margin-top: -240px;
margin-left: -170px;
}
Maybe the scrollbar is not rendered because it's disabled (there's no more content), otherwise try with overflow-y:auto