Reputation:
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..
Upvotes: 2
Views: 10900
Reputation: 36794
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.
Upvotes: 3