Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-19 19:13:27

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

< p > tag annoyances

I hope someone can answer this question, as I feel I am going crazy. I have found that, for some reason unknown to me, I am unable to create custom styles for < p > tags when they are being applied to textpattern tags.

as in, trying to style content output by < txp : message > or < txp : body >

the only style textpattern seems to recognize is the top level one, as in:

p
{ text-align: left; font-size: 11px; line-height: 20px; color: #c9c9c9; padding: 0; margin: 0;
}

but if I try to apply another p style, such as

p.example
{ font-size: 14px; color: #556666; padding: 10px;
}

it will still display as the original p style. if I try using a < div > tag or something to style the content, that doesn’t work either. for example, comments seem to be pre-wrapped in a plain < p > tag, and nothing seems to enable me to change the style of them except editing the original < p > tag, which of course messes with the rest of my content.

I have gone over everything, and the only thing I can think of is that I am missing something in the way textpattern handles css in forms. however, I can’t seem to find any online resources that talk specifically about applying styles to textpattern forms…

Last edited by marcusyoungdog (2007-01-19 19:16:44)

Offline

#2 2007-01-19 19:33:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: < p > tag annoyances

Wrap the content of your article form in a div, like this:

<div class="post">
<h3><txp:title /></h3>
<txp:body />
</div>

and you can style .post p, .post h3 and whatever other html elements there are in the CSS. The same goes for the ‘comments’ form.

Offline

#3 2007-01-19 19:58:58

marcusyoungdog
New Member
Registered: 2007-01-19
Posts: 9

Re: < p > tag annoyances

thanks so much. that worked like a charm. I knew it had to be something simple.

Offline

Board footer

Powered by FluxBB