2

Is there any way or is it possible to give a inline css style in shortcode tag, e.g Consider the following shortcodes:
[vc_row]some content[/vc_row]
in above beginning shortcode tag i.e[vc_row] , can we give inline css style in it like [vc_row style="background-color:red;"] or some other way to give it inline css style. I just curious some way to do it..

1 Answer 1

3

Yes, you can pass a css parameter.

This parameter takes a CSS block with a unique class:

[vc_row css=".vc_custom_1446466804838{background-color: red;}"]

Sidenote: You are not 'giving CSS to a shortcode'. The shortcode you are using outputs HTML markup and the nature of the shortcode just so happens to allow a parameter with CSS to be applied to the row that is created.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, You are right, the visual composer also added this same inline style css like yours when we set color from row design setting tab. Maybe I have some other issue...

Your Answer

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