Forum
Additional p tags = invalid markup
Hi there,
I seem to be having an issue with additional and unwanted p tags when using the textile editor.
For example,
<p>I have a paragraph block like this which has a few lines of text to it. Now when i go to view the html i get unwanted and empty p tags that appear in the code like below.</p>
<p></p>
This isn't really a massive problem as it doesn't effect my page layout but when i go and validate it throws out some errors.
Is there anyway to fix this problem at all?
Many thanks,
//C
That's right, all of the editors will wrap paragraphs in paragraph elements. The fix would be not to add your own. Or not to use an editor if you don't want formatting.
Thanks for getting back to me, Rachel.
Just so i'm clear, I can't get rid of the empty p tags that are generated below the ones with content in them? Which in turn means the html will be invalid? What if there is no paragraph/content and it still generates the p tags?
I'm not a stickler on valid markup, i'm more being curious than anything else.
Thanks again,
Can you show us your template?
Hi guys,
Sorry didn't see this response come in.
Sure, template is like so:
Change it to:
Ah that'll get you. Thanks, Drew.