How to set ngx modal to the center of the screen? By default, it is almost on top,
class: 'modal-dialog-centered', on the parameters doesn't make any difference
There is a .modal class in a ModalComponent of ngx-bootstrap, so, you can try to override its styles and position your modal, as you want
It basically looks like this :
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
Related
I want to add a sticky image in my footer. I want to accomplish this using only html and css. Can anyone help me figure out how to do this?
here is the image - https://prnt.sc/whc1kq
also, here is my html and css code:
html- https://prnt.sc/whca7m
css- https://prnt.sc/whc528
thank you in advance
For aligning any image at bottom of the screen with sticky behaviour
.fixImage{
position: fixed;
bottom: 0;
right: 0;
}
<img src="yourimagepath" class="fixImage"/>
As per the requester query I have updated code with max-width: 250px
.fixImage{
position: fixed;
bottom: 0;
right: 0;
max-width: 250px;
}
<img src="https://placehold.it/412x413" class="fixImage"/>
Try with position absolute instead of sticky and tweak with the margins. I m pretty sure this will work.
Do you mean like this?
position: absolute;
position: sticky;
z-index: 1;
float: right;
How do I set the materialize swipeable tabs at bottom?
Thanks.
Just give the tabs absolute positioning,
{
position: absolute;
bottom: 0;
}
like so: https://jsfiddle.net/8ctz7gpc/
This is the CodePen of a very short simple code.
only html and css, and Bootstrap
It shows a very basic Bootstrap carousel with an added white transparent overlay. The carousel caption should appear on top of the overlay, but it doesn't appear like that in Chrome Browser. Firefox,though, is showing it like it's supposed to.
I want the text to slide and appear on top of the still overlay on all browsers.
Why not using:
CSS
.carousel-inner > .item::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: white;
z-index: 1;
opacity: 0.5;
}
Instead of a separate overlay container?
I mean there even is a content: '' in your CSS for this container, so I guess it was or was supposed to be a pseudo element.
I've been trying some diffrent tutorials on how to get my navbar stick to the top while scrolling but can't get it to work :/
This is the page i'm having troubles with:
http://www.vernietig.be/vcs/index.html
Thanks in advance for helping me out on this one!
Try this:
#header {
position: fixed;
top: 0;
left: 0;
right: 0;
}
This will stick your navigation on top :
#yourTopNav{
top : 0;
position : fixed;
}
Add this to your css:
body { margin-top: 55px; }
nav { position: fixed; clip: auto; }
I don't know why you have that clip: rect(0,0,0,0) but that hides the whole menu, you may even have to inline that directive, or remove the .nav-collapse class that causes it (but I don't really know how is your menu supposed to work :P).
I dont know how to phrase this question correctly, I would like to create something like the logo on the upper right corner of this website: http://www.afterthecircle.com/
When the user scrolls down, the logo moves with the scrolling movement and always stays visible to the user.
Any suggestions?
Use position: fixed along with top or bottom and left or right:
.logo {
position: fixed;
bottom: 1em;
right: 1em;
}
As brbcoding said, you are looking for the CSS property position with the value fixed. With the properties top, bottom, left, and right, you can then position the element. An example:
CSS
.fixedElement {
position: fixed;
top: 100px;
left: 100px;
}
HTML
<div class=fixedElement>Hey!</div>
Fixed positioning will allow you to scroll and keep an item in it's original position.
#fixed-thing {
position: fixed;
top: 0;
right: 0;
}
DEMO