WpBakery (Visual Composer) - Responsive best practices
up vote
1
down vote
favorite
I'm using wpbakery wordpress plugin. I added in design options padding and generated css code looks like:
.vc_custom_1541499756394 {
padding-top: 30px !important;
padding-right: 250px !important;
padding-left: 250px !important;
}
I need to remove padding on smaller screen sizes.
My question is, what is best practice to do that?
Simple media query like this or there is better way?
@media only screen and (max-width: 720px) {
.vc_custom_1541499756394 {
padding-top: 0px !important;
padding-right: 0px !important;
padding-left: 0px !important;
}
}
css wordpress responsive visual-composer
add a comment |
up vote
1
down vote
favorite
I'm using wpbakery wordpress plugin. I added in design options padding and generated css code looks like:
.vc_custom_1541499756394 {
padding-top: 30px !important;
padding-right: 250px !important;
padding-left: 250px !important;
}
I need to remove padding on smaller screen sizes.
My question is, what is best practice to do that?
Simple media query like this or there is better way?
@media only screen and (max-width: 720px) {
.vc_custom_1541499756394 {
padding-top: 0px !important;
padding-right: 0px !important;
padding-left: 0px !important;
}
}
css wordpress responsive visual-composer
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using wpbakery wordpress plugin. I added in design options padding and generated css code looks like:
.vc_custom_1541499756394 {
padding-top: 30px !important;
padding-right: 250px !important;
padding-left: 250px !important;
}
I need to remove padding on smaller screen sizes.
My question is, what is best practice to do that?
Simple media query like this or there is better way?
@media only screen and (max-width: 720px) {
.vc_custom_1541499756394 {
padding-top: 0px !important;
padding-right: 0px !important;
padding-left: 0px !important;
}
}
css wordpress responsive visual-composer
I'm using wpbakery wordpress plugin. I added in design options padding and generated css code looks like:
.vc_custom_1541499756394 {
padding-top: 30px !important;
padding-right: 250px !important;
padding-left: 250px !important;
}
I need to remove padding on smaller screen sizes.
My question is, what is best practice to do that?
Simple media query like this or there is better way?
@media only screen and (max-width: 720px) {
.vc_custom_1541499756394 {
padding-top: 0px !important;
padding-right: 0px !important;
padding-left: 0px !important;
}
}
css wordpress responsive visual-composer
css wordpress responsive visual-composer
asked Nov 7 at 10:23
user3590094
807
807
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
A more flexible approach would be to remove all of the styles you've added to the VC meta box and assign a class to it, pushing the required styles that way. Doing so will enable you to be specific for viewports and enable you to reuse the style across your site.
Set your Design Options like this:
And assign a style here:
Then add the required styles to the class.
Hope that helps :)
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
A more flexible approach would be to remove all of the styles you've added to the VC meta box and assign a class to it, pushing the required styles that way. Doing so will enable you to be specific for viewports and enable you to reuse the style across your site.
Set your Design Options like this:
And assign a style here:
Then add the required styles to the class.
Hope that helps :)
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
add a comment |
up vote
1
down vote
A more flexible approach would be to remove all of the styles you've added to the VC meta box and assign a class to it, pushing the required styles that way. Doing so will enable you to be specific for viewports and enable you to reuse the style across your site.
Set your Design Options like this:
And assign a style here:
Then add the required styles to the class.
Hope that helps :)
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
add a comment |
up vote
1
down vote
up vote
1
down vote
A more flexible approach would be to remove all of the styles you've added to the VC meta box and assign a class to it, pushing the required styles that way. Doing so will enable you to be specific for viewports and enable you to reuse the style across your site.
Set your Design Options like this:
And assign a style here:
Then add the required styles to the class.
Hope that helps :)
A more flexible approach would be to remove all of the styles you've added to the VC meta box and assign a class to it, pushing the required styles that way. Doing so will enable you to be specific for viewports and enable you to reuse the style across your site.
Set your Design Options like this:
And assign a style here:
Then add the required styles to the class.
Hope that helps :)
answered Nov 7 at 12:21
Ash Loudon
348
348
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
add a comment |
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
Thanks, i see ... using Design options is a bad practice..
– user3590094
Nov 7 at 12:26
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
I'm not sure it's 'bad practice' but you can make life easier for yourself by using classes.
– Ash Loudon
Nov 7 at 12:27
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Yes, but i didn't find way to remove padding on mobile screens when is added on Design options...vc-custom class can't be overided... or i'm wrong?
– user3590094
Nov 7 at 12:51
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
Remove all the padding in the design options and include it as a declaration on the class you specify for that element.
– Ash Loudon
Nov 7 at 13:23
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53187536%2fwpbakery-visual-composer-responsive-best-practices%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown