Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-15 16:15:52

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

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

#2 2006-08-15 23:42:58

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

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

#3 2006-08-16 14:29:37

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

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

#4 2006-08-16 14:53:18

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

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>

&nbsp;

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

#5 2006-08-16 14:55:50

alittle116
Member
From: Brooklyn
Registered: 2005-09-14
Posts: 72
Website

Re: getting rid of the P tag in article body tag

ahh yes thank you. i understand.

Offline

Board footer

Powered by FluxBB