By Ulysses Gonzalez on Sunday, 30 July 2017
Posted in General Issues
Likes 0
Views 1.1K
Votes 0
Attempting to customize the search button.
I created a custom.css file inside

/templates/currenttemplate/com_easyblog/styles/custom.css



The issue is one of the css codes is written like;

#eb .mod-btn-primary {
color: #fff !important;
background-color: #1e88e5 !important;
border-color: #1e88e5 !important
}

Located here;

/components/com_easyblog/themes/wireframe/styles/style-modules-5.1.10.min.css


No matter what i do whether using the custom.css within

or custom.css that I created within;

/templates/currenttemplate/css/custom.css


Is there something I am missing in the code in order to override css that has "!important" on it?
Hello Ulysses,

You could try to be more specific with your selectors for it to be inherited,

[gist]
body #eb .mod-btn-primary {
color: #fff !important;
background-color: #1e88e5 !important;
border-color: #1e88e5 !important
}
[/gist]
·
Sunday, 30 July 2017 18:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Worked great.... Thanks, Mark.

There is just one issue that I noticed and totally don't know if it has to be written any special way.

For the word "search" it works well in Safari but doesn't in firefox or chrome.

There seems to be one last issue.

As there was one other line I wanted to touch up; which was;


body #eb.eb-mod.eb-mod-search .mod-btn{
height: 39px;
}


This was to align the lines around "search" phrase within safari; which now looks good.
Unfortunately, it flipped so now firefox/chrome doesn't align properly.

What would one write prior to placing the following so it will function properly in safari and exclude the other two?

By the way, the code prior to making the change was:


#eb.eb-mod.eb-mod-search .mod-btn {
height: 32px;
}
·
Sunday, 30 July 2017 18:48
·
0 Likes
·
0 Votes
·
0 Comments
·
·
Sunday, 30 July 2017 18:48
·
0 Likes
·
0 Votes
·
0 Comments
·
That is probably because of the difference in the way browsers are calculating the box layouts. I suppose you can fix the height of the input so that it works on both browsers,

[gist]
body #eb.eb-mod.eb-mod-search .form-control {
height: 39px;
}
[/gist]
·
Sunday, 30 July 2017 23:24
·
0 Likes
·
0 Votes
·
0 Comments
·
That did the trick.
Thanks, Mark!
·
Monday, 31 July 2017 11:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Monday, 31 July 2017 13:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post