How to make ion-select select-icon position right but just icon, select-text position left - ionic-framework

I want it to have a standart design on ionic input elements. I have an ion-select element and this element inside select box text align-left but I want select-icon align right. I do on HTML element like that: https://ibb.co/99YXc8B. But I am not doing in the sccs style. I try a lot. Stackblitz link: https://stackblitz.com/edit/ionic-fdqf4z?file=pages%2Fhome%2Fhome.scss

Replace your CSS with this CSS code.it will works.
[inline-icon] {
font-size: 2em !important;
padding-right: 3px !important;
color: #808080ba !important;
}
.try{
color: red;
width:100%;
}
ion-select
{
max-width: 100%;
}

Related

I would like to change the font-size of my headerName in ag-grid

this seems like such a simple thing to do, but I can't seem to do it. I've tried using CSS in my scss file, like this:
.ag-header-cell-text {
font-size: 8px;
color: red;
background-color: red;
}
or like this:
.ag-header-cell
font-size: 8px;
color: red;
background-color: red;
}
but nothing changes, not the color either. setting the headerheight works but doesn't help me. I just want the font smaller.
I've also tried adding a cellStyle property to the columnDefs, but nothing seems to works, nor can I find a solution. Please help.
Adding !important may work.Or maybe your class names don't correct. Check it by f12 (inspect) and correct.
.ag-header-cell-text {
font-size: 8px !important;
color: red !important;
background-color: red !important;
}
.ag-header-cell
font-size: 8px !important;
color: red !important;
background-color: red !important;
}

Ion Refresher Background color wont change ionic

I'm using an ionic refresher to refresh content on a page in my application. However, when I pull up the ion-refresher, background does not get fully set to the color I want.
This is a CSS class I'm applying to the ion-refresher:
ion-refresher {
background-color: #dedede;
}
ion-refresher-content {
background-color: #dedede;
}
And this it what the result looks like:
How do I remove the white gap between the ion refresher and the main content?
On Ionic 4, this CSS worked for me:
ion-refresher-content {
padding-bottom: 200px;
background-color: yellow;
.refresher-pulling {
position: fixed;
top: 50px;
}
}
The padding-bottom: 200px; fills up the space to show the yellow color, but it also introduces a new issue. The refresher arrow disappears! In order to keep the arrow in place and make it function normally, the .refresher-pulling and its corresponding styles are added. This way, now the app background color shows without any white gaps and also the spinner stays in place.
Hope this helps someone.
When you pull up, one div was been created called fixed-content
For remove the gap just add .fixed-content in your .scss
Example:
.fixed-content{
background:#dedede;
}
This is what got it working for me.
ion-refresher-content {
padding-bottom: 100px;
background-color: #dedede;
}
#devner's solution is not working correctly with iPhone X and kind (i.e. devices with safe-area-inset).
Proper solution (Ionic 4):
ion-refresher-content {
position: relative;
padding-bottom: 200px;
background-color: var(--base-background-color-body);
.refresher-pulling, .refresher-refreshing {
position: relative;
top: 30px;
}
}
Appendix: best UX on my opinion can be achieved with next HTML:
<ion-refresher slot="fixed" pullFactor="0.5" (ionRefresh)="onPullToRefresh($event)">
<ion-refresher-content
pullingIcon="refresh"
refreshingSpinner="crescent"
></ion-refresher-content>
</ion-refresher>

Form Submit Button Hover Effect Not Showing

I have a submission button for a form. I use a sprite as the background, and so on hover I shift the background over the width of my button to get the hover effect. However, this is not working.
This is my html:
<form class="a">
<All the other Fields...>
<p><input type="submit" value="Submit"/><p>
</form>
And my css:
.a input[type="submit"] {
margin-top: 15px;
background: url(btn.png) no-repeat;
width: 108px;
height: 42px;
border: none;
color: transparent;
font-size: 0;
}
.a input[type="submit"]:hover {
background: url(btn.png) no-repeat 109 0;
}
.a input[type="submit"]:hover {
background: url('btn.png') no-repeat 109px 0px; /*use 109px */
}
and check your background image path.
Background-position: for x: %|px|left|center|right and for y %|px|top|center|bottom
It could be
.a input[type="submit"]:hover {
background: url(btn.png) no-repeat;
background-position: 109px 0px; // left 109px, top 0px
}
Or
.a input[type="submit"]:hover {
background: url(btn.png) no-repeat 109px 0px;
}
Also make sure your image path is right. Right now your image should be at the same folder where your css is, according to url(btn.png).
You're missing px on your position. See this fiddle for a working example

adding a border-radius without padding to fancybox2

I'm using fancybox 2 and I can get rid of the padding around the outside of the frame, but then I lose the border-radius that it comes with.
What I want is a border-radius around the main content inside the frame. So I tried going into the css and adding a border-radius to the fancy-box inner selector and it won't work. How can I give the frame a rounded corner without a border?
If anyone can help me with this that would be great!
Try this code it worked for me
Add custom classes after fancy box on complete method.
Ex.
HTML
Login
JS
$(document).ready(function(e) {
$(".signin-ovr").fancybox({
afterLoad : function(){
$("#fancybox-content").addClass('fancybox-content-cust');
$(".fancybox-bg").addClass('fancybox-bg-cust');
$("#fancybox-outer").addClass('fancybox-outer-cust');
}
});
});
CSS
.fancybox-content-cust {
overflow: visible !important;
border: 10px solid #FFFFFF;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.fancybox-bg-cust{
display: none;
}
.fancybox-outer-cust {
background: transparent !important;
}
Then you will get border radius to the overlay box.
for fancybox v2 round borders
.fancybox-outer, .fancybox-inner, .fancybox-skin {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
border-radius: 10px!important;
}
CSS3 has a border radius property ironically enough entitled border-radius there are a few specific variations ie, Firefoxes moz-border-radius.
It is used like so:
#div-id .specific-class {
border-radius: 10px;
}
If you only want one rounded it has the ability to be modified like so
border-top-left-radius:2em;
border-top-right-radius:2em;
border-bottom-right-radius:2em;
border-bottom-left-radius:2em;
I hope this answers your question.

positioning and font size issues on iPhone Safari

I'm trying to make this website: http://501commons.org render the same on iPhone as on other browsers. On Android it works just fine. I have already added the -webkit-text-size-adjust: 100%; to the body style, which helped a little. What is still not working are the following pieces, and I can't figure out why mobile safari is not displaying them properly:
the top left logo just plain won't show up
the search box in the top right is way too far to the left
the red slogan in the header "A Resource for Nonprofits etc" is too large, too low, and extends beyond the right border
the font of the three nav menu items (Explore the Commons, Volunteer, Invest) is too large
Everything else seems ok, at least on the home page. What's weird is that all four problems above occur in the header.
Any help would be hugely appreciated!
Thanks!
I figured it out:
Top left logo
The logo not showing up was due to a strange non-cascading issue. The logo is an <img> tab inside an <a id="portal-logo" ...>. The #portal-logo has a display: inline-block; rule in the next-to-last stylesheet that applies to it, but not in the last one. In other words, this is what we have:
#portal-logo { /* in the last CSS file */
margin-bottom: 0;
}
#portal-logo { /* in the next-to-last CSS file */
display: inline-block;
margin: 1.375em 0;
}
Adding display: inline-block; to the last stylesheet magically makes the logo appear. Then I had to also fiddle with margins, position, top, etc to make it appear in the right place, but all these are in a CSS file that is loaded conditionally only on mobile browsers, so it's ok. It's just really strange that Safari on iOS does not cascade the display: inline-block; style!
Search box
I made the search box be rendered in the proper place by adding text-align:right; to its container, even though an earlier rule for the same container with text-align:left; makes it work just fine in every other browser.
Slogan
The slogan required the most tweaking. It's contained in a <div id="slogan">. Here is the old rule:
#slogan {
color: #EE3524;
float: right;
font-size: 110%;
font-weight: bold;
margin-right: -190px;
padding-top: 60px;
position: relative;
z-index: 1;
}
And here is the new rule that works on mobile safari:
#slogan {
-webkit-text-size-adjust: 100%;
clear:right;
color:#ee3524;
font-size:17.6px;
font-weight: bold;
float:right;
margin-right:0px;
padding-bottom:50px;
padding-top:0px;
position:relative;
text-align:right;
z-index:1;
}
One of the key differences is the absolute font-size in px, instead of as a % value.
Menu Items font
Likewise, specifying the font-size in px instead of % seemed to be the key here:
Old:
#portal-globalnav li a {
background-color: transparent;
color: #FFFFFF;
font-size: 1.2em;
font-weight: bold;
min-width: 3em;
padding-bottom: 11px;
}
New:
#portal-globalnav li a {
background-color:transparent;
color:#fff;
font-size:15.4px;
font-weight:bold;
padding-bottom:11px;
min-width:3em;
}
YMMV!