Datatables custom div overlay - html

I want to create custom select div container working together with datatables but there is a problem i faced
This is how it looks without datatables (basic html table):
and this is how it looks with datatables:
As i understand the problem is in datatables overflow but i cant figure out how to deal with this.
Is it possible to make this custom select to be overlayed datatables table as it is with basic html table without datatables?
Here is HTML code of my custom select:
<td class='text-center'>
<input
type="text"
class='form-control form-control-sm w-auto'
placeholder="Трекинг-система"
v-model='LiveEdit_value'
#blur='LiveEditBlur'
autocomplete="off"
v-focus
>
<div
class='position-absolute w-auto shadow-sm rounded bg-light'
style='max-height: 300px; overflow: auto; z-index: 1'
>
<ul class='list-group'>
<a href='javascript:void(0)'
class='list-group-item list-group-item-action py-1 px-2'
v-for='trackingsys in filteredTrackingSystems'
#mousedown.prevent='LiveEdit_value = trackingsys.name; LiveEditBlur()'
>
<img :src='trackingsys.logo' width='16' class='mr-1'> {{ trackingsys.name }}
</a>
</ul>
</div>
</td>
Thanks

Related

Not able to see entire text when embeded clear button in inputbox

In Angular, I have added clear button inside input box but after adding it I am not able to see entire text in input box as it is being overlapped. Please find detailed information below.
HTML Code
<ng-template pTemplate="input">
<input pInputText type="text" class="col-input-grid-100" >
<span class="mar-left">
<button (click)="clearmail1(ri)" style="border:none; outline: none; position: relative; width:0;background-color: #fff;">
<i class="pi pi-times"></i>
</button>
</span>
</ng-template>
CSS content
.col-input-grid-100{
width: 135%;
margin-left: -10px;
}
.mar-left{
margin-left:-29px;
}
Current Output: Text in input box is test3#test.com.
As you can see in above image "com" is not visible clearly. I tried multiple ways but things didnt work. Kindly help me to resolve this issue.
Note:
1. I want to show cross button inside input box only
2. I am not using bootstrap library.
I tried with below code and it worked for me.
<span class="p-input-icon-right">
<i class="pi pi-times" (click)="clearmail1(ri)" style="margin-right: -16px;"></i>
<input id="email1" class="col-input-grid-100" type="text" pInputText >
</span>
Output

how to correctly target specific buttons on wordpress site to customise css

I am trying to style certain buttons on my wordpress site by adding in custom css in the customiser.
The block of code where my buttons are nested is
<div class="xoo-cp-container">
<div class="xoo-cp-outer">
<div class="xoo-cp-cont-opac"></div>
<span class="xoo-cp-preloader xoo-cp-icon-spinner"></span>
</div>
<span class="xoo-cp-close xoo-cp-icon-cross"></span>
<div class="xoo-cp-content" style="opacity: 1;"><div class="xoo-cp-atcn xoo-cp-success"><span class="xoo-cp-icon-check"></span>Product successfully added to your cart</div>
<table class="xoo-cp-pdetails clearfix">
<tbody><tr data-xoo_cp_key="7f5d04d189dfb634e6a85bb9d9adf21e">
<td class="xoo-cp-remove"><span class="xoo-cp-icon-cross xoo-cp-remove-pd"></span></td>
<td class="xoo-cp-pimg"><img width="300" height="450" src="#" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" alt="" loading="lazy" srcset="#"></td>
<td class="xoo-cp-ptitle">Gin - Case 12x 5cl
</td><td class="xoo-cp-pprice"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">£</span>99.00</bdi></span></td>
<td class="xoo-cp-pqty">
<div class="xoo-cp-qtybox">
<span class="xcp-minus xcp-chng">-</span>
<input type="number" class="xoo-cp-qty" max="" min="1" step="1" value="2" pattern="[0-9]*">
<span class="xcp-plus xcp-chng">+</span></div>
</td>
</tr>
</tbody></table>
<div class="xoo-cp-ptotal"><span class="xcp-totxt">Total : </span><span class="xcp-ptotal"><span class="woocommerce-Price-amount amount"><bdi><span class="woocommerce-Price-currencySymbol">£</span>198.00</bdi></span></span></div>
</div>
<div class="xoo-cp-btns">
<a class="xoo-cp-btn-vc xcp-btn" href="#">View Cart</a>
<a class="xoo-cp-btn-ch xcp-btn" href="#">Checkout</a>
<a class="xoo-cp-close xcp-btn">Continue Shopping</a>
</div>
</div>
and the buttons I'm trying to style are located at the end of the code block
<div class="xoo-cp-btns">
<a class="xoo-cp-btn-vc xcp-btn" href="#">View Cart</a>
<a class="xoo-cp-btn-ch xcp-btn" href="#">Checkout</a>
<a class="xoo-cp-close xcp-btn">Continue Shopping</a>
</div>
i've tried to style each of them in the following way
.xoo-cp-btn-vc{background:green!important; color:white!important;}
a.xoo-cp-btn-vc{background:green!important; color:white!important;}
.xoo-cp-btns .xoo-cp-btn-vc{background:green!important; color:white!important;}
a.xoo-cp-btns .xoo-cp-btn-vc{background:green!important; color:white!important;}
but none of them are correct, can someone please help me correctly target the correct elements please.
Much Appreciated!
a good way to find how they are currently styled is to hop in the inspector.
In the styles section you can see what the classes used to select the button currently are. So when trying to overwrite these classes you'll have to make sure your selectors are weighted more heavily than the existing ones.
The importance of css selectors is as follows
100 points for IDs
10 points for classes and pseudo-classes
1 point for tag selectors and pseudo-elements
Note: If the element has inline styling that automatically wins (1000
points)
So if there is currently 5 classes pointing to your button those styles will have a weight of 50 while your a.xoo-cp-btn-vc class selector has a weight of 20 for having the a and the .xoo-cp-btn-vc
Adding specificity to your selectors should help, and if you use the exact same selectors that are currently used the !important should be enough to overwright them

<fieldset> has no border

I'm trying to use a <fieldset> to group some controls. No matter what I do I can't get the border to display. My understanding is it should display by default. In the <style> I've tried setting border-width:1px which does nothing and border:solid draws a border outside of everything including the <legend>. I've tested in both Firefox and Chrome and no difference. What am I missing? Here is an example of my code. I'm playing with different layouts so ignore the inconsistency.
<div class=" col-4 col-sm-4 col-med-4 col-lg-4 col-xl-4 e-primary" style="justify-content:space-around">
<fieldset>
<legend>Project Basics</legend>
<ul>
<li>
<label for="txtName">Name</label>
<input type="text" id="txtName" />
</li>
<li>
<label for="txtDescription">Description</label>
<textarea rows=3 cols=20 id="txtDescription"></textarea>
</li>
</ul>
</fieldset>
</div>
<div class=" col-4 col-sm-4 col-med-4 col-lg-4 col-xl-4 e-primary" style="justify-content:space-around">
<fieldset>
<legend>Cost Estimations</legend>
<label for="txtEstTotalHrs">Estimated Total Hours</label>
<input type="text" id="txtEstTotalHrs" />
<label for="txtEstLaborCost">Estimated Labor Costs</label>
<input type="text" id="txtEstLaborCosts" />
</fieldset>
</div>
And this is what I'm seeing, no borders.
Update to comments:
Mushroomator, yes I am using bootstrap. Are you saying to add the whole bootstrap css to the snippet? And I am the designer of the project.
Mike K., Agreed, I am not seeing whats in the plain snippet so something is being overwritten. I wasn't very clear but I did look at the what styles are being applied and at the Fieldset level, if I change the Border setting to 1px it draws an outside box around the fieldset. I added an image from the dev tools.
*JonoJames, I tried adding styling to the tag like this <fieldset style="border-color:black !important; border-style:solid !important"> and I still see nothing. When I look at the dev tools, it shows those attributes set at the Element level but nothing changes on the front end.
This should be a simple problem.
Testing Update: I found the references to the bootstrap css in the _Layout.cshtml file so I started commenting them out , one at a time. The offender seems to be <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> The only reference to fieldset, other than fieldset:disabled, is in this line.
fieldset{min-width:0;padding:10rem;margin:10rem;border:10rem}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}#media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}
I've tried setting all properties to something other than zero but no effect. settings like "10px" or "25rem". Anytime I do get a border, its always an "outside" border like this:
You could add a custom border with CSS
.fieldsetColored{
border-color: #F00;
border-style: solid;
}
<fieldset class="fieldsetColored">
<legend>box</legend>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<label for="txtEstTotalHrs">Estimated Total Hours</label></br>
<input type="text" id="txtEstTotalHrs" /></br>
<label for="txtEstLaborCost">Estimated Labor Costs</label></br>
<input type="text" id="txtEstLaborCosts" /></br>
</tr>
</table>
</fieldset>
You probably have a conflicting style sheet somewhere that turns the border off If its bootstrap use the !important CSS override style attribute
!important
looking at the class list <div class=" col-4 col-sm-4 col-med-4 col-lg-4 col-xl-4 e-primary" style="justify-content:space-around">
This looks like bootstrap
Finally figured it out. According to this discussion Fieldset legend does not work everything is turned off for fieldset borders in Bootstrap 5. To get the original alignment of the Legend (inline with the border) you have to set the Legend float:none; and width:auto;
My final CSS looks like this:
fieldset {
margin-bottom: 1em !important;
border: 1px solid #666 !important;
padding:1px !important;
}
legend {
padding: 1px 10px !important;
float:none;
width:auto;
}
Thanks for all your input. Reading through your replies a couple times helped me with my troubleshooting.
This should work!
<fieldset class="border rounded-3 p-3">
<legend class="float-none w-auto px-3">
Your Title
</legend>
<p>Your content</p>
</fieldset>

Responsiveness of Checkbox with an input group’s addon

This is the part of the HTML file of my Angular project, where I am using a checkbox with an input groups addon
<td
style="width: auto; word-wrap: normal"
class="text-wrap"
>
<fieldset>
<div class="input-group mb-3">
<div class="input-group-prepend">
<div
class="input-group-text"
style="height: 30px"
>
<input
type="checkbox"
id="checkbox-addon1"
class="form-check-input"
/>
</div>
</div>
<input
type="text"
class="form-control"
placeholder="Compare data"
style="height: 30px; width: 80px"
/>
</div>
</fieldset>
</td>
When seeing this on desktop, it is showing in a correct way -
But when the same thing I am seeing in mobile view, I see like this
In mobile view, checkbox and text are not coming in the same line. Can anyone please help me to resolve this issue?
Edit 1:
I have defined the heading of this table column as
<th style="width: 9em" scope="col">Compare data</th>
Edit 2:
Based on what #HAPPY SINGH answered,
I tried using the below part of code, in my scss file
.input-group {
white-space: nowrap;
.form-control {
width: 50px !important;
padding-left: 0%;
padding-right: 0%;
}
}
But as soon as I change from width: 40px, the mobile view breaks again
Yes,
Use this few style CSS and remove inline CSS added in external CSS.
Mobile view media query:
#media only screen and (max-width: 767px) {
.input-group {
white-space: nowrap;
}
.form-control {
width: 40px;
}
}
Use this:
<div class="input-group mb-3" style="white-space: nowrap">
or
<div class="input-group mb-3" style="display:flex">
to disallow wrapping.
On the other hand, it is likely that .input-group already does this. Your elements are contained in a table column, and table will always display all of its columns, even when there is not enough screen space available, which is likely why the layout breaks. Rather than using tables for layout, prefer a flexbox approach instead.
Try this:
<div class="input-group mb-3" style="display: flex;">

Mobile Safari Z-Index Not Working

I have a plugin (intro-js) for creating an introductory tour containing a opaque overlay with spotlights on my page divs.
Using the following css rules I try to bring up the element within class introjs-showElement above all other elements.
How can it show the element in css like my desktop browsers? Currently I only see a white box in my css.
.introjs-showElement,
tr.introjs-showElement>td,
tr.introjs-showElement>th {
z-index: 99999998 !important;
}
.introjs-showElement>* {
-webkit-transform: translateZ(1px) !important;
}
HTML Sample of Div Text and Toggle Buttons not showing up (all exist in a fixed header scrollable angular angular datatable plugin)
<td class="td-nopadding ng-enter-fast ng-leave">
<div class="Table-textbox introjs-showElement introjs-relativePosition" ng-attr-id="{{$index==0 ? 'intro-1': ''}}" id="intro-1">
<div class="text-input">
<input class="form-control input-number ng-pristine ng-untouched ng-valid ng-not-empty ng-valid-maxlength" name="ParLevel[0]" ng-model="data.ParLevel" value="1" min="0" max="9999" ng-keypress="filterValue($event)" maxlength="4" ng-blur="changeData();">
</div>
<div class="inc-dec-buttons">
<button type="button" class="btn-number" data-type="plus" data-field="ParLevel[0]">
<span class="glyphicon-plus"></span>
</button>
<br>
<button type="button" class="btn-number" data-type="minus" data-field="ParLevel[0]">
<span class="glyphicon-minus"></span>
</button>
</div>
</div>
</td>
This is a known issue with the library:
https://github.com/usablica/intro.js/issues/532
https://github.com/usablica/intro.js/issues/507
https://github.com/usablica/intro.js/issues/401
https://github.com/usablica/intro.js/issues/123
...to name a few.
The issue is the stacking context and the way that introJs makes elements appear on top:
The library requires all parent nodes of the target element to be in the same stacking context of the body (for example). position: fixed creates a new stacking context (as does transform).
So this issue won't be fixed until introJs adjusts its methodology of making target elements appear on top.