Unable to display right tick mark in checkbox in tablets and iPad - ipad

I have following code, it displays check mark ticked on desktop. But doesn't work on iPad and tablets. Functionality is working but right mark is not shown.
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 borderAtRight"
<!-- Dropdown and Menu -->
<div class="btn-group topFilterCtrl filterDropdn" dropdown
dropdown-append-to-body
id="ddlStatus">
<div id="btn-append-to-body" type="button"
class="btn btn-primary panelTextFont14 noBorder"
dropdown-toggle>
Status<span class="caret caretSpan"></span>
</div>
<ul class="dropdown-menu dropDownLabel" role="menu"
aria-labelledby="btn-append-to-body"
ng-show="!vm.showthis">
<div class="customScroll">
<li role="menuitem" class="changeColorOnHover"
ng-repeat="optionThis in vm.List track by $index"
ng-show="list.value != null">
<a href="#">
<div class="checkbox" id="{}index}"
ng-show="this.value != null"
ng-click="vm.applyFilterForResultCount()"
ng-change="vm.getCount(this)"
ng-model="this.flag">
<label>
<input type="checkbox"
ng-click="vm.clickStatusCheckBox(this);$event.stopPropagation();"
ng-show="this.value != null"/>
{{this.value}}
</label>
</div>
</a>
</li>
</div>
<!--Clear div-->
<li role="menuitem" class="btn btn-default buttonli"
ng-click="vm.clearAll()">
<a href="#">
<p>
<span class="clearAllBtn">Clear</span>
<span class="dropDownBtnItem"> – All </span>
</p>
</a>
</li>
</ul>
</div>
</div>
.topFilterCtrl{
text-align: left;
vertical-align: middle;
padding-top: 8%;
padding-bottom: 0%;
border-radius: 0;
margin-top: 0%;
box-shadow: none;
outline: none;
border:none;
width:100%;
}
portrait:
div.borderAtRight .filterDropdn{
padding-top:14%;
}
.filterDropdn{
padding-top: 10%;
height: 50px;
max-height: 50px;
overflow: hidden;
}
.noBorder{
text-align: left;
width:#full-width;
box-shadow: none;
outline: none;
min-width: 80%;
padding: 0;
height: auto;
min-height: 36px;
border-top-color: none;
border-top-style: none;
border-top-width: none;
border-right-color: none;
border-right-style: none;
border-right-width: none;
border-bottom-color: none;
border-bottom-style: none;
border-bottom-width: none;
border-left-color: none;
border-left-style: none;
border-left-width: none;
}
.dropDownLabel{
margin:0 0 0 -16px;
}
.customScroll{
height: auto;
overflow-x: hidden;
max-height:360px;
}
.customScroll>li>a,
.customScroll>li>a:hover,
.customScroll>li>a:active,
.customScroll>li>a:focus {
display: block;
padding: 1px 22px;
clear: both;
white-space: nowrap;
text-decoration : none;
}
.buttonli {
border-left: 0;
border-right: 0;
border-radius: 0;
margin: 2px 0px 2px 0px;
width: 100%;
background-color:#E4EAEF;
}
li.buttonli > a > p{
margin-bottom:0;
}
input[type="checkbox"]{
-webkit-appearance: checkbox;
}
I found this: https://github.com/angular-ui/bootstrap/issues/2017
But not sure how do I implement it, where should I really include this directive in my code as I am very new to AJS?

The checkbox may not display correct because the input element is nested inside the label element (even though it may be allowed, it confuses the purposes of the input and the label).
If the issue is about the checkbox not being checked by default, you might need to check out the ng-checked="expression" syntax for Angular.

Related

Hover on a tag only fill the background where the text is present

I am using nested loop
when I hover on list item a tag it only hover the are which contains the texts not the whole ul tag
thanks
<style>
.child {
display: none;
}
.parent:hover .child {
display: table-caption !important;
}
.LastHope li:hover a {
background: #5db2ff !important;
}
.second {
display: !important;
margin-left: -40px;
}
.parent {
width: 5%;
padding-right: 45px;
}</style>
<div class="container-fluid" id="upper;">
<div class="row">
<div>
<ul style="display: -webkit-box; color: white; background: #5db2ff; font-size: 16px; font-family: 'Segoe UI'; height: 22px; ">
#foreach (var item in Model)
{
<li class="parent">
<a class="first"> #item.Name</a>
<ul class="LastHope" style="overflow-y: visible !important; color: white; font-size: 16px; font-family: 'Segoe UI'; width: 80%; background: #338dc7; border-left: 1px solid white; ">
#foreach (var Temp in item.T_Page.ToList())
{
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">#Temp.Name</a>
</li>
}
</ul>
</li>
}
</ul>
</div>
</div>
</div>
To change the background color of the whole inner unordered list .LastHope on hover rather than just the anchor element, just add the background color to the <ul> element as well when hovered like this:
.LastHope:hover {
background: #5db2ff;
}
Check and run the following Code Snippet for a practical example of the above code:
.child {
display: none;
}
.parent:hover .child {
display: table-caption !important;
}
.LastHope:hover {
background: #5db2ff !important;
}
.LastHope:hover li a {
background: #5db2ff !important;
}
.second {
display: !important;
margin-left: -40px;
}
.parent {
width: 5%;
padding-right: 45px;
}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script><link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid" id="upper">
<div class="row">
<div>
<ul style="display: -webkit-box; color: white; background: #5db2ff; font-size: 16px; font-family: 'Segoe UI'; height: 22px; ">
<li class="parent">
<a class="first">A</a>
<ul class="LastHope" style="overflow-y: visible !important; color: white; font-size: 16px; font-family: 'Segoe UI'; width: 80%; background: #338dc7; border-left: 1px solid white; ">
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">A</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">B</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">C</a>
</li>
</ul>
</li>
<li class="parent">
<a class="first">A</a>
<ul class="LastHope" style="overflow-y: visible !important; color: white; font-size: 16px; font-family: 'Segoe UI'; width: 80%; background: #338dc7; border-left: 1px solid white; ">
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">A</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">B</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">C</a>
</li>
</ul>
</li>
<li class="parent">
<a class="first">A</a>
<ul class="LastHope" style="overflow-y: visible !important; color: white; font-size: 16px; font-family: 'Segoe UI'; width: 80%; background: #338dc7; border-left: 1px solid white; ">
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">A</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">B</a>
</li>
<li class="child">
<a class="second" style="border-bottom: 1px solid white; background: #338dc7;">C</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>

Button text not rendering correctly on iPhone (CSS3)

I'm building an app that uses angular and node.
Ive done some CSS work to get the styling how I like.
When I view the buttons on the web, at all screen sizes,
it looks great, but on the iPhone, it looks horrible.
Everything is aligned weird and the padding/margins are incorrect.
Only inside the button.
Ive tried -webkit-appearance: none!important;
but have had no luck. I tried it on every element.
Anyone know what I can do to get my buttons to render like they
do on the web?
Here is a fiddle that replicates the problem. View it on phone and web view : https://jsfiddle.net/2543ge0a/2/
.socialBtn {
-webkit-appearance: none!important;
width: 300px;
color: #fdfdfd;
font-weight: bold;
text-align: center!important;
font-size: 17px;
}
.field p.control {
margin: 0 auto;
text-align: center!important;
}
.fbBtn {
-webkit-appearance: none!important;
background-color: #3b5998!important;
border-radius: 0;
text-align: center;
color: #fdfdfd;
border: none;
}
.googleBtn {
-webkit-appearance: none!important;
background-color: #D84B37!important;
border-radius: 0;
text-align: center;
color: #fdfdfd;
border: none;
}
.linkedinBtn {
-webkit-appearance: none!important;
background-color: #0077b5!important;
border-radius: 0;
text-align: center;
color: #fdfdfd;
border: none;
}
.signUpBtn {
-webkit-appearance: none!important;
background-color: #0077be!important;
border-radius: 0;
text-align: center;
color: #fdfdfd;
border: none;
}
.page {
padding-top: 0;
padding-left: 30px;
padding-right: 30px;
padding-bottom: 50px;
}
.title.has-text-centered {
color: #111;
font-size: 60px;
font-weight: 500;
margin-bottom: 1rem;
width: auto;
}
h4.title {
font-size: 25px;
text-align: center;
}
.subtitle {
margin-top: 1.5rem!important;
text-align: left;
line-height: 1.5;
}
h3.title {
color: #fdfdfd;
text-align: left;
font-size: 35px;
line-height: 1.3;
}
#media(max-width: 325px) {
h3.title {
color: #fdfdfd;
text-align: left;
font-size: 22px;
line-height: 1.3;
margin-bottom: 10px;
}
.subtitle {
margin-top: 1rem!important;
text-align: left;
line-height: 1.2;
font-size: 17px;
}
}
#media(max-width: 400px) {
h3.title {
color: #fdfdfd;
text-align: left;
font-size: 28px;
line-height: 1.3;
margin-bottom: 10px;
}
.subtitle {
margin-top: 1rem!important;
text-align: left;
line-height: 1.3;
}
}
a {
color: #FF9933;
}
.subtitle.is-6 {
margin-bottom: 30px;
}
button {
-webkit-appearance: none!important;
text-align: center!important;
}
#ctaBtn {
-webkit-appearance: none!important;
padding: 5px 7px;
height: 40px;
width: 150px;
color: #fdfdfd;
font-weight: 600;
font-size: 18px;
box-shadow: 2px 2px 6px #111!important;
background-color: #FF9933;
border: none;
text-align: center!important;
-webkit-transition: all .15s ease; /* Safari and Chrome */
-moz-transition: all .15s ease; /* Firefox */
-ms-transition: all .15s ease; /* IE 9 */
-o-transition: all .15s ease; /* Opera */
transition: all .15s ease;
}
section.section {
background-color: transparent;
padding-top: 0;
padding-bottom: 140px;
}
.button:hover {
-webkit-appearance: none!important;
-webkit-transform: translateY(3px);
-moz-transform: translateY(3px);
-ms-transform: translateY(3px);
-o-transform: translateY(3px);
transform: translateY(3px);
}
.button:active {
-webkit-appearance: none!important;
-webkit-transform: translateY(4px);
-moz-transform: translateY(4px);
-ms-transform: translateY(4px);
-o-transform: translateY(4px);
transform: translateY(4px);
}
.is-primary {
background-color: #0077be!important;
}
.is-primary:hover {
background-color: #0077be!important;
opacity: .8;
}
input.input, textarea.textarea {
border-radius: 0;
border-right: none;
border-top: none;
border-left: none !important;
box-shadow: none !important;
background: transparent!important;
color: #fdfdfd;
}
input::-webkit-input-placeholder {
color: #111!important;
opacity: .6;
}
input:-moz-placeholder { /* Firefox 18- */
color: #111!important;
opacity: .6;
}
input::-moz-placeholder { /* Firefox 19+ */
color: #111!important;
opacity: .6;
}
input:-ms-input-placeholder {
color: #111!important;
opacity: .6;
}
.textarea {
min-height: 10px;
}
input.input:focus, textarea.textarea:focus {
border-bottom-color: #0077be;
}
p.content {
color: #111;
}
#error {
z-index: 1000;
color: red;
font-weight: bold;
text-align: center;
padding: 13px 30px;
margin: 0 auto;
top: 0;
opacity: 0;
height: 0;
width: 300px;
-webkit-transition: all .2s;
-moz-transition: all .2s;
-ms-transition: all .2s;
-o-transition: all .2s;
transition: all .2s;
}
img.image {
margin: 0 auto;
}
#media(min-width: 650px) {
img.image {
max-height: 400px;
max-width: 300px;
}
}
#media screen and (min-width: 1008px) {
.page {
padding-left: 150px;
padding-right: 150px;
}
.container {
width: inherit;
}
.subtitle.is-6 {
font-size: 20px;
}
a {
font-size: 22px;
font-weight: 500;
cursor: pointer;
}
}
#media(max-width: 700px) {
.socialBtn {
-webkit-appearance: none!important;
width: 250px;
text-align: center!important;
}
}
<div class="modal" [ngClass]="{'is-active': signup}">
<div class="modal-background"></div>
<div class="modal-card">
<section class="modal-card-body">
<i class="fa fa-times-circle" aria-label="close" (click)="onClickAction('exit')" style="float: right;
-webkit-transform: translateX(10px);
-moz-transform: translateX(10px);
-ms-transform: translateX(10px);
-o-transform: translateX(10px);
transform: translateX(10px); translateX(10px)"></i>
<div class="container">
<h4 class="title"
style=" font-family: 'Ubuntu', sans-serif;color: #0077be;">For the innovators</h4>
<h6 class="subtitle has-text-centered">Signup</h6>
<p class="content">For our first <strong style="color: #FF9933; font-size: 17px;">1000</strong> users, we're offering
<strong style="color: #FF9933; font-size: 17px;">free</strong>
fees on all transactions for the first year. We'll take care of the business, you just provide the electronics.</p>
<div *ngIf="!signupComplete">
<div class="field" style="text-align: center">
<div class="card">
<input
type="email"
name="email"
#emailT="ngModel"
[(ngModel)]="user.email"
placeholder="email *required"
required
style="color: #111"
class="input">
<input
type="text"
name="name"
#nameT="ngModel"
[(ngModel)]="user.name"
placeholder="name"
style="color: #111"
class="input">
<input
type="text"
name="image"
#imageT="ngModel"
[(ngModel)]="user.image"
placeholder="image url"
style="color: #111"
class="input">
</div>
</div>
<div class="field">
<p class="control">
<button
(click)="onSignup()"
class="button socialBtn signUpBtn has-text-centered">Join rent
</button>
</p>
</div>
<h4 class="subtitle has-text-centered">Or</h4>
<div class="field">
<p class="control">
<button
(click)="authSignin('facebook')"
class="button socialBtn fbBtn">
<span class="icon is-small">
<span class="fa fa-facebook"></span>
</span> <span> | Signup with Facebook</span>
</button>
</p>
</div>
<!--<div class="field">-->
<!--<p class="control">-->
<!--<button-->
<!--(click)="authSignin('linkedin')"-->
<!--class="button socialBtn linkedinBtn">-->
<!--<span class="icon is-small">-->
<!--<span class="fa fa-linkedin"></span>-->
<!--</span> <span> | Signup with Linkedin</span>-->
<!--</button>-->
<!--</p>-->
<!--</div>-->
<div class="field">
<p class="control">
<button
(click)="authSignin('google')"
class="button socialBtn googleBtn">
<span class="icon is-small">
<span class="fa fa-google"></span>
</span> <span> | Signup with Google</span>
</button>
</p>
</div>
</div>
<img src="../../assets/animat-checkmark-color.gif" alt="" class="image" *ngIf="checkmark">
<h4 class="title" *ngIf="thankyou">Thanks for signing up! <br>Look out for an email</h4>
</div>
</section>
</div>
</div>
As you described that Everything is aligned weird and the padding/margins are incorrect on iPhone. It seems that viewport is missing, So add this viewport to your header. Hope this will help you.
<meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" />

Ionic CSS Styling Off when Deployed to iOS but fine everywhere else

So when I am looking at my app on android phones and in the browser, the header (and sub header) looks like the following
When I am running on iOS emulator, or deploying to iOS phone, it looks like the following:
The markup looks like the following
<ion-header-bar class="bar item-input-inset search">
<div class="buttons buttons-left header-item">
<span class="left-buttons">
<button class="button button-icon button-clear ion-navicon" ng-click="showMenu()">
</button>
</span>
</div>
<label class="item-input-wrapper search">
<input placeholder="Search..." ng-model="model.searchTerm" ng-change="updateSearchTerm(model.searchTerm,model.quickSearchType)" type="text">
</label>
<button class="button button-clear" ng-click="clearSearch()">
<i class="icon" ng-class="{'ion-close':model.searchTerm.length > 0}"></i>
</button>
</ion-header-bar>
<ion-header-bar class="bar bar-sub-header item-input-inset action-sub-header">
<button ng-style="model.quickSearchType == 'featured' && {'font-weight': 'bold'}"
style="color:#fff;"
class="button button-clear col col-33"
ng-click="quickSearch('featured',model.searchTerm)">
FEATURED
</button>
<button class="button button-clear col col-33"
ng-style="model.quickSearchType == 'nearby' && {'font-weight': 'bold'}"
style="color:#fff;"
ng-click="quickSearch('nearby',model.searchTerm)">
NEARBY
</button>
<button class="button button-clear col col-33"
style="color:#fff;"
ng-style="model.quickSearchType == 'recent' && {'font-weight': 'bold'}"
ng-click="quickSearch('recent',model.searchTerm)">
RECENT
</button>
</ion-header-bar>
The CSS I have is the following:
.action-sub-header {
background-color: #007fff;
}
.item-input-inset {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
-moz-align-items: center;
align-items: center;
position: relative;
overflow: hidden;
padding: 10.66667px;
}
.bar-header {
top: 0;
border-top-width: 0;
border-bottom-width: 1px;
}
.bar {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
position: absolute;
right: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
padding: 5px;
width: 100%;
height: 44px;
border-width: 0;
border-style: solid;
border-top: 1px solid transparent;
border-bottom: 1px solid #ddd;
background-color: white;
/* border-width: 1px will actually create 2 device pixels on retina; */
background-size: 0;
}
The ion-header-bar has a specific css on ios to add space on top of it for the iOS statusbar. You have to override it in your case.
To test the ios specific css in your browser, edit the classes on the body tag. Replace platform-browser by platform-ios and platform-macintel or platform-windows by paltform-cordova.
When you have do that, you'll be able to see the specific style applied by the ionic css:
.platform-ios.platform-cordova:not(.fullscreen) .bar-header:not(.bar-subheader) > * {
margin-top: 20px;
}
You just need to override it.
You need to add ionic.Platform.fullScreen(); to your $ionicPlatform.ready function.

Align two side by side divs with a variable-length link in the center of each div

I am trying to have two divs (red boxes) side by side, and within each red box should be a bordered link.
One link is on two lines whereas the second link is on one line.
The links should lie at the center (horizontally and vertically) of each box, and the two boxes should also be perfectly aligned.
My code is the following. I had to set the links as "display: table-cell;" to keep the two boxes aligned. If you have another solution, i'm listening ^^.
* {
margin: 0;
padding: 0;
}
#marketing-button, #prints-button {
background-color: red;
text-align: center;
width: 10em;
height: 10em;
display: inline-block;
}
#marketing-link, #prints-link {
color: white;
vertical-align: middle;
display: table-cell;
float: none;
font-size: 1em;
border: yellow solid 2px;
text-align: center;
margin-left: auto;
margin-right: auto;
padding: .2em;
}
<body>
<div id="container">
<div id="marketing-button">
<a id="marketing-link" href="#">Digital <br />marketing</a>
</div>
<div id="prints-button">
<a id="prints-link" href="#">Prints</a>
</div>
</div>
</body>
Thanks guys!
Ok, i found the solution.
Each link should be set to display as inline-block and should be contained within a div displayed as a table-cell.
This allows to center the link vertically.
The table-cells should themselves be contained within divs displayed as inline-blocks. This allows the red boxes to be aligned and to have a space between them.
Here is the final code:
* {
margin: 0;
padding: 0;
}
.container {
display: inline-block;
}
#marketing-button, #prints-button {
background-color: red;
text-align: center;
width: 10em;
height: 10em;
display: table-cell;
vertical-align: middle;
margin-right: 20px;
}
#marketing-link, #prints-link {
color: white;
display: inline-block;
float: none;
font-size: 1em;
border: yellow solid 2px;
text-align: center;
padding: .2em;
}
<body>
<div class="container">
<div id="marketing-button">
<a id="marketing-link" href="#">Digital <br />marketing</a>
</div>
</div>
<div class="container">
<div id="prints-button">
<a id="prints-link" href="#">Prints</a>
</div>
</div>
</body>

JQuery UI draggable: All elements are moved istead of one - only in IE

I have a problem with draggable feature in Internet Explorer.
I have 2 columns, each of them contains a list of cards. I want to drag a card from one column to another.
Problem is when I start dragging, cards from other column are moved as well. This happens only in IE.
HTML:
<div class="card-container">
<div class="card-row">
<div column_id="1" class="card-column drag" style="width: 133px;">
<ul style="height:100%; width:100%" >
<li story_id="2" class="card" style="position: relative;">
<div>Card1</div>
</li>
</ul>
</div>
<div column_id="2" class="card-column drag" style="width: 133px;">
<ul style="height:100%; width:100%" class="snap">
<li story_id="1" class="card" style="position: relative;">
<div>Card2</div>
</li>
</ul>
</div>
</div>
</div>
JS:
$(".drag").find(".card").draggable({
revert: "invalid"
});
$(".card-column").droppable({
accept: ".card",
drop: function( event, ui ) {
$(this).find("ul").append("<li class=\'card ui-draggable\' story_id=\'" + ui.draggable.attr("story_id") + "\' style=\'position: relative;\'>" + $(ui.draggable).html() + "</li>");
ui.draggable.remove();
$(".drag").find(".card").draggable({
revert: "invalid"
});
}
});
CSS:
.card-container{
display: table;
}
.card-column{
display: table-cell;
min-height: 200px;
border: 1px solid #B6B6B6;
}
.card-row{
min-height: 200px;
display: table-row;
}
.card-column ul {
list-style: none outside none;
margin: 0 0px;
padding: 0px 0 0;
position: relative;
}
.card-column ul li{
background: none repeat scroll 0 0 #F6F6F6;
border: 1px solid #D0D0D0;
border-radius: 3px;
margin: 5px;
}
JSFiddle
Im using jQuery UI 1.8.6
How can I prevent other cards to move?
Cheers
In CSS add float:left to .card-column class
.card-column{
display: table-cell;
float:left;/*ADD THIS*/
min-height: 200px;
border: 1px solid #B6B6B6;
}

Resources