Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
getting rid of the P tag in article body tag
when i generate the article body tag within txp, it automatically includes a P tag which causes any text after the body to be automatically moved below it.
I want to display the article and then display the author/date directly after that in the same paragraph?
anyone know how i can do this?
thanks
Offline
Re: getting rid of the P tag in article body tag
Is the article body only one paragraph? If so, add to your style sheet…
p {
margin-bottom: 0px;
}
…then your author/date should snug right up after it with no bottom margin (you might want to add an appropriate selector before “p” so that the above doesn’t affect every paragraph on the page).
If the article body has more than one paragraph, there’s another solution, but it’s hard to spell it out without seeing an example of how you’re using it.
Last edited by reid (2006-08-15 23:43:27)
TextPattern user since 04/04/04
Offline
Re: getting rid of the P tag in article body tag
thanks, but what i am really trying to do is have the “Posted By” text in the same <code><P></code> tag as the article body. sort of like this….. Any ideas??
<img src=“http://www.diskoweb.com/thedeadshark/images/text.gif”/>
Offline
Re: getting rid of the P tag in article body tag
OK, if the article body is one paragraph only, there’s no way to include the “posted by” within that paragraph.
However, you could turn off Textile for the article (“Advanced Options” to the left of the article form), and there will be no code wrapped around the body at all when you post a new article. You can then wrap the body in whatever tag(s) you want using the article form.
Example:
<code>
<h3><txp:title /></h3>
<div class=“article”><txp:body /> <span>Posted by <txp:author /></span></div>
</code>
You could then use the span tag to style the “posted by” portion, and it would follow the body “inline.”
Last edited by reid (2006-08-16 14:54:20)
TextPattern user since 04/04/04
Offline
Re: getting rid of the P tag in article body tag
ahh yes thank you. i understand.
Offline