Extra p tags during VC shortcodes

Posted in: Newspaper
Post count: 388

Hi,

Since (I think) we don’t have individual licence codes for VC I can’t make a support account, so I decided to post here.

I notice that when I use VC row shortcodes in posts, I get extra <p> tags added before and after the columns.

You can see this on this (temporarily visible) post here: http://themedium.ca/magazine-articles/kids-these-days

The photos are in five rows, each with 1/3 columns, inserted using the shortcode. If you inspect source you can see that there are empty <p></p> tags between the row opening and closing and the columns.

The problem is that this makes the first column no longer the first child of the row div and so the style doesn’t set its left margin to 0. Because of this, there’s no longer room for the third column and it gets pushed onto the next line.

I assume the reason this happens in posts and not pages has something to do with the the_content filter or something?

Thanks! 🙂

Post count: 7909

Hi,

The

tags are by wordpress and nothing we can do about it. But the margin issue can be solved using css code with media queries: http://screencast.com/t/GIB2r1FCsLvhttp://screencast.com/t/5W9KMCETIC

@media(min-width: 1020px){
.single .td-post-text-content .row-fluid [class*="span"]{
margin-left: 2.5641025641026% !important;
}
}
@media(min-width: 768px) and (max-width:1019px){
.single .td-post-text-content .row-fluid [class*="span"]{
margin-left: 1.5641025641026% !important;
}
}

Hope this helps!

Post count: 388

Thanks! It does work. Now to purge some caches…

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.