Angular Bootstrap (ngx) datepicker inline - css

I want to make the ngx bootstrap datepicker inline instead of it appearing only when you click an input.
ngx datepicker link
Can someone help me achieve this? I've tried to add it in but there is absolute positioning and if I override it with relative positioning it doesn't work properly.
I just want to see this on the page inline without the need of having it inside an input field box:
Thanks
There is a container input in the documentation which says:
container: A selector specifying the element the datepicker should be appended
to. Currently only supports "body".
Any way to get around this?

try this, set the height to 0 with overflow: hidden an leaving it on the page. It'll be there so the picker with position itself correctly but with no height the input will be invisible and still have the picker show up where its supposed to.
And you can set the isOpen property to true so its opened by default
<input bsDatepicker [isOpen]="true" style="height: 0; overflow: hidden; border: none; padding: 0;" />

in you global css style.css file give
bs-datepicker-container {
position: relative !important;
left: 0 !important;
top: 0 !important;
}
!important is required to coz it is having element level style so you need to override it.
Obvious: make toggle disable and show permanently.

Related

How to make all alignment button of each column in same row?

I'm stuck in a css position, how can I make all alignment button of each column in same row? I'm using wordpress plugin and tried used css to select class name, but class name are specify for all button, please somebody help me out..
Try this
CSS
.vc_gitem_row .vc_gitem-col {
padding: 10px;
min-height: 300px;
}
.vc_btn3-container.vc_btn3-left {
bottom: 0;
position: absolute;
text-align: left;
}
Note: You should scope this changes so they don't affect other sections of the site
Without seeing the code this is a bit difficult to answer, but I would take a look at setting min-height for the description above the buttons. Then it would at least push all the buttons to be aligned in a row. You would have to go even further setting some media queries to improve this styling when it comes to mobile.
Either you need to set height of Text container
max-height: 100px; //as your requirement
or set button wrapper style property
bottom:0px;
Set a min-height value for product text content just above the button in product card.

CSS - Default scrollbar display property

I have an ASP.Net Web Forms application that has the following CSS defined in a master stylesheet:
::-webkit-scrollbar {
display: none;
}
I'm working on a new page that pops up a modal dialog that will sometimes have vertical overflow. In this case, I need the scrollbar to be displayed for my overflow div. However, I can't find a default display property for ::webkit-scrollbar that resets the scrollbar to its original display state. I tried unset and initial unsuccessfully.
I also tried adding a .scroll class to the div I need the scrollbar to display for, and then changing the master CSS to:
:not(.scroll) ::-webkit-scrollbar {
display: none;
}
But that didn't work either. Can anyone help?
try this
.hideThumb::-webkit-scrollbar-thumb { /* we apply the style to actually hide it*/
display: none;
}

Bootstrap tooltip inside ag-grid cell showing partially

I am trying to show bootstrap tooltip in ag-grid cell on hover. Issue is it's showing up partially while part of the tooltip is behind the next column cell. I tried setting z-index for tooltip. But still not able to succeed. Kindly help.
In ngx-bootstrap documentation:
When you have some styles on a parent element that interfere with a tooltip, you’ll want to specify a container="body" so that the tooltip’s HTML will be appended to body. This will help to avoid rendering problems in more complex components (like our input groups, button groups, etc) or inside elements with overflow: hidden
You can use the attribute container="body" to solve the problem
You can use CSS tooltips, which will work inside agGrid cells. Please take a look at this plnkr: tooltip in agGrid cell
[data-tooltip]:before {
content: attr(data-tooltip);
display: none;
position: fixed;
margin: 10px 10px 10px 10px;
}
I was able to solve this one by adding the following CSS
[col-id=health].ag-column-hover: {
overflow: visible
}
for angular5+ with ng-bootstrap use container="body"
Try using tooltip-append-to-body="true" option for bootstrap tooltip.
For me this worked, Add below css to your file.
All credit goes to https://stackoverflow.com/a/46007051/16456741
.ag-sparkline-tooltip {
position: fixed;
}

Targeting the ahref by clicking the padding

Newbie question here. I have a navigation bar with padding in all of my li's, and I want to be able to target the ahref when you click in the padding. Would this be done with onclick/javascript for each li? or is there a simple CSS method?
Also I have a search bar, that I want to focus by clicking on it's padding as well. I assume this would require a similar method.
First, you must set display:inline-block as a property for your links. Then, remove the padding from your list-item and apply it to the links.
Your CSS should reflect the following:
li a {
display: inline-block;
padding: 10px;
}
Here's a fiddle for a working example.
maybe you could specify:
li.someclass a {
display: inline-block; //or display:block;
width: 100%;
height: 100%;
}
(remember to specify width/height of parent container aswell)
not sure if i got you right though
Set the padding to the anchor instead of to the li.
See http://jsfiddle.net/FBsKH/ and compare.
About the search bar, can you post some code?
If I add padding to a <input type="text" /> and I click it on it's padding, it gets focus (tested on Firefox and Chrome). See it here: http://jsfiddle.net/fnsRu/
Edit:
Ah, now I understand what you want with the search bar.
The problem is that AFAIK with CSS you can't set focus to an element.
Then, you can:
Remove paddings: http://jsfiddle.net/fnsRu/3/
Use JavaScript: http://jsfiddle.net/fnsRu/4/

How to change the width of h:outputLabel

I am having a hard time trying to change the width of my h:outputLabel, but I still could not get it changed.
By using CSS, I can change the color, font, frame, anything but NOT the WIDTH.
Thank you so much.
The HTML label element which is generated by h:outputLabel is by default displayed as a widthless inline element. You need to set its CSS display property to block to be able to change the width.
E.g.
label {
display: block;
width: 150px;
}

Resources