5

I have this button which i have added a custom icon to.

I would like to remove the lighter gray which is within the icon. enter image description here

This lighter gray is not part of the icon, it's got to be somewhere within jquery's CSS which i should be able to overide. enter image description here

What can I do to my CSS to accomplish this?

You can view source on the link i've provided but here is the current CSS:

.ui-icon-my-map {
    background-image: url("images/103-map.png");
    background-position: 4px 50%;
    background-size: 26px 21px;
    height: 24px;
    margin-top: -12px !important;
    width: 35px;
}

6 Answers 6

3

your problem is:

.ui-icon, .ui-icon-searchfield::after {
  background: #666;
  background: rgba(0, 0, 0, .4);
}

just add

.ui-icon-my-map {
[...]
  background-color: transparent;
}
Sign up to request clarification or add additional context in comments.

Comments

2

You can overide with your css (put it after jquery mobile css load, or add important at the end).

.ui-icon, .ui-icon-searchfield::after {
background: none;
}

2 Comments

This removed my icon. hannes and thepriebe got it. (+1) for the effort.
It depends of where you do it. It works only if you change directly the css.
1

For the style of this guy

<span class="ui-icon ui-icon-my-map ui-icon-shadow"></span>

Add:

background-color: transparent;

1 Comment

(+1) for the effort but Hannes answered first.
1

Set the background color of the span to transparent.

.ui-icon-my-map{
    background-color: transparent;
}

enter image description here

Comments

1

Go to jquery.mobile-1.0.1.min.css and go to line and find .ui-icon, .ui-icon-searchfield:after

Then on background change to

url("images/icons-18-white.png") no-repeat scroll 0 0 transparent;

instead of

url("images/icons-18-white.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0.4)

Comments

0

Something like this work:

HTML

<div data-role="page" id="home">
    <a id="bnt_edge" data-role="button" data-inline="false" data-transition="turn" href="#" rel="external" data-icon="my-map" data-theme="c" data-iconshadow="false">My Button</a>
</div>​

CSS

.ui-icon-my-map {
    background-image: url("https://i.sstatic.net/zjB5L.png");
    background-position: 4px 50%;
    background-size: 26px 21px;
    height: 24px;
    margin-top: -12px !important;
    width: 35px;
    background-color: transparent;
}​

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.