Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-11-19 07:33:23
- mellyshum
- New Member
- Registered: 2006-11-19
- Posts: 3
css for textpattern tags
I’m feeling very confused as to how to change the CSS for the various tags that textpattern uses.
for example, if we look at the attributes for <txp:recent_articles />
it says:
class=“class name” CSS class attribute, default is recent_articles.
So does that mean that to change the CSS for that tag I would write something like:
#recent_articles {
font-family: “Lucida Grande”,Verdana, Arial, Helvetica, sans-serif;
color: #6bb845;
font-size:20px;
}
I’ve tried this and it doesn’t change anything. So I’m left wondering how Textpattern works. In the page code there is a single line <txp:recent_articles />
that results in a title “Recent Articles” and then a list of the recent articles. Changing the CSS for the recent articles tag doesn’t do anything so do I have to change the CSS for a specific type of heading instead or a specific type of list?
When do I change the CSS of tags and what does that do?
Offline
Re: css for textpattern tags
maybe try .recent_article and not #
I havent make the test but should works.
Offline
#3 2006-11-19 09:51:35
- mellyshum
- New Member
- Registered: 2006-11-19
- Posts: 3
Re: css for textpattern tags
Dragondz wrote:
maybe try .recent_article and not #
Oh I forgot to change that. I initially wrote .recent_article and it didn’t work so I tried #. Neither of them did anything.
Last edited by mellyshum (2006-11-19 09:51:54)
Offline
Re: css for textpattern tags
can we have a url?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: css for textpattern tags
You can adjust the class using <txp:recent_articles class="my_class" />
. You would then use this css: .my_class { color: #fcc; }
Here’s a short table on Templating, rendered HTML, and CSS selectors:
Textpattern Template | Rendered HTML | CSS |
---|---|---|
<txp:recent_articles break="li" class="foo" wraptag="ul" /> |
<ul class="foo"><li><a href="/link">some title</a></li></ul> |
.foo { /*styles*/ } |
<ul id="foo"><txp:recent_articles break="li" /></ul> |
<ul id="foo"><li><a href="/link">some title</a></li></ul> |
#foo { /*styles*/ } |
#
= html id (<ul id="foo">
).
= html class (<ul class="foo">
)- Textbook entry
Offline
#6 2006-11-20 03:01:27
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: css for textpattern tags
Neither of them did anything.
Probably an inheritance problem.
Offline
#7 2006-11-20 07:11:29
- mellyshum
- New Member
- Registered: 2006-11-19
- Posts: 3
Re: css for textpattern tags
Hmmm well these have all been helpful replies, however none of the additional things I’ve tested has caused any results.
I tried changing the code to <txp:recent_articles class="butt" />
and then adding a .butt{} to the css but that has had no effect either.
the url is tavisland.com/test.
I’m sort of lost right now.
Offline
#8 2006-11-20 07:27:58
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: css for textpattern tags
AH. Class is applied to the wrapping tag, and by default, there isn’t one. If you do:
<txp:recent_articles wraptag="p" class="butt" />
It should work. :)
Offline
Pages: 1