Jump to content


Photo
- - - - -

Tabs does not work well

shortcode tabs css

Best Answer Danny , 10 June 2013 - 10:46 AM

Hi,

 

This is a Wordpress quirk, see this topic to resolve your issue.

 

http://www.pagelines...mpty-pp-markup/

 

Basically Wordpress likes to add p tags when you do a line-break, so you can either follow the instructions from the topic above or edit your shortcode so it contains no line-breaks.

For example:

 
[pl_tabs][pl_tabtitlesection type="tabs"][pl_tabtitle active="yes" number="1"]Title 1[/pl_tabtitle][pl_tabtitle number="2"]Title 2[/pl_tabtitle][/pl_tabtitlesection][pl_tabcontentsection][pl_tabcontent active="yes" number="1"]Lorem ipsum dolor sit amet, consectetur adipiscing elit[/pl_tabcontent][pl_tabcontent number="2"]<img class="pl-imageframe" alt="" />[/pl_tabcontent][/pl_tabcontentsection][/pl_tabs]
Go to the full post


  • Please log in to reply
3 replies to this topic

#1 pracede

pracede

    Member

  • Members
  • 26 posts
  • Framework Version:Developper

Posted 10 June 2013 - 10:25 AM

Hi,

 

I have added tabs on my website. I use shortcode provide on the link

Please Login or Register to see this Hidden Content

.  Instead of be displayed on the same like on the pagelines example. You can see it on the following link http://troll.ws/image/87c96c86#.UbWoLNjvjCo

 

 

My tabs are displayed the first on the first line and the second below. You can see it here :

Please Login or Register to see this Hidden Content

 

When i inspect the code i notice this :

 

 

<ul class="

Please Login or Register to see this Hidden Content

"><br />
<li class='

Please Login or Register to see this Hidden Content

'>
<a href="

Please Login or Register to see this Hidden Content

" data-toggle="

Please Login or Register to see this Hidden Content

">
Title 1</a></li><br />
<li ><a href="

Please Login or Register to see this Hidden Content

" data-toggle="

Please Login or Register to see this Hidden Content

">
Title 2</a></li><br />
</ul></p>
<p> <div class="

Please Login or Register to see this Hidden Content

">
<br />
<div class="

Please Login or Register to see this Hidden Content

" id="

Please Login or Register to see this Hidden Content

">
<p><p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit</p>
</p></div><br />
<div class="

Please Login or Register to see this Hidden Content

" id="

Please Login or Register to see this Hidden Content

">
<p><p>
<img class="

Please Login or Register to see this Hidden Content

" alt="" />
</p>
</p></div><br />
</div></p>
<p> </div>

 

The <br/> is generated on my code. I am wondering if it is normal ?



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15903 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 10 June 2013 - 10:46 AM   Best Answer

Hi,

 

This is a Wordpress quirk, see this topic to resolve your issue.

 

Please Login or Register to see this Hidden Content

 

Basically Wordpress likes to add p tags when you do a line-break, so you can either follow the instructions from the topic above or edit your shortcode so it contains no line-breaks.

For example:

Please Login or Register to see this Hidden Content



#3 pracede

pracede

    Member

  • Members
  • 26 posts
  • Framework Version:Developper

Posted 10 June 2013 - 12:10 PM

thank you for the help



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15903 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 10 June 2013 - 01:02 PM

No problem!







Also tagged with one or more of these keywords: shortcode, tabs, css