Peter Pik
Peter Pik

Reputation: 11193

Revolution slider creates p tag before

I've added a revolution slider to my Wordpress theme. There seems to be an issue where it creates a <p> tag before the slider which creates a white space, which does not look good.

When I look at the css and html code in the browser it looks like this:

Why does it and how can I remove the <p> tags before revolution slider?

<p><!-- START REVOLUTION SLIDER 4.6.0 fullwidth mode --></p>

<div id="rev_slider_3_1_wrapper" class="rev_slider_wrapper fullwidthbanner-container" style="margin: 0px auto; padding: 0px; max-height: 400px; height: 342px; overflow: visible; background-color: rgb(233, 233, 233);">

Upvotes: 2

Views: 1707

Answers (2)

faby
faby

Reputation: 7566

in the Troubleshooting box of Revolution slider there is an option named "Output Filters Protection". Enable it. This should solve your problem.

Upvotes: 3

SW4
SW4

Reputation: 71230

It will be easier (most likely) to suppress the redundant p, seeing as it contains only a comment it is essentially empty. As such, you can target and hide it with:

Demo Fiddle

p:empty{
    display:none;
}

More on :empty

The :empty pseudo-class represents any element that has no children at all. Only element nodes and text (including whitespace) are considered. Comments or processing instructions do not affect whether an element is considered empty or not.

Upvotes: 3

Related Questions