1

I am making a website in wordpress and I'm using a paid template. The template comes with a bootstrap grid. The issue I have is editing some css code, because I can't find the source of the css codes. Css codes

As you can see on the screenshot, the media queries are located at grid-responsive.css. The code I want to edit is the css above it. I want to remove the padding-right: 30px !important; from .mpce-prvt-4661-5a018ae17a157:not(.mpce-dsbl-padding-right) and same for the left side.

But I can't find the css file and on the right side it doesn't tell me which file the source is. I searched in all the css files I have and couldn't find it. Someone having an idea how to locate it?

7
  • I know where grid-responsive.css is, it's about the css above it Commented Nov 16, 2017 at 8:47
  • 3
    My guess would be that it is dynamically generated from JS, so there is no CSS file to look in. Commented Nov 16, 2017 at 8:47
  • @idbruin: it seems to be a style inside <style></style> (generated by JS or included by any plugin?). Try to find string 30px !important in whole directory, you'll find where it's generated. Commented Nov 16, 2017 at 8:48
  • 2
    Press Ctrl-F and type .mpce-prvt-4661-5a018ae17a157 it'll be an inline style Commented Nov 16, 2017 at 8:49
  • 1
    Thanks @Liam , I found it that way. It is in a <style> with id='template-name'-private-styles. So what @sébastien-gicquel is saying is the answer Commented Nov 16, 2017 at 8:58

2 Answers 2

3

You can write your CSS in an other file. Usually, paid templates offer the possibility to add your own custom CSS in admin or in a custom CSS file. Check your WordPress theme parameter or documentation.

This method is called "override". It means that you don’t modify original template (otherwise your modifications could be deleted when you update the template).

You just copy and modify the CSS you want to change.

original CSS file :

.test {
    color: red;
}

In custom.css :

.test {
    color: blue;
}
Sign up to request clarification or add additional context in comments.

1 Comment

@JohannesGrandy What do you mean ? I didn’t say that it had to be loaded async. custom.css has to be loaded after the original css file
0

CSS references that do not show a source in the inspector are usually generated from sources that are not CSS.

The most common source for this is JavaScript.

The easiest solution would be to simply open the entire project in something like Visual Studio and search the whole project for the css string.

1 Comment

The easiest solution would be to simply open the entire project in something like Visual Studio and search the whole project for the css string. or press Ctrl-F...

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.