Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-10-26 21:28:33
- pollo
- Member
- Registered: 2005-02-17
- Posts: 22
Selectors? CSS? New guy here.
How can I make two selectors, one for links in body copy and one for header links. Right now my article titles are the same as the links in the articles.
Also, is there a guide to what the default TXP selectors control?
Thanks,
p
Offline
Re: Selectors? CSS? New guy here.
You might want to start with a good CSS tutorial.
You cooin’ with my bird?
Offline
Re: Selectors? CSS? New guy here.
And once you’ve mastered a littel bit what css is, you can go to read Roger Johanson’s recent turorials on CSS selectors.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#4 2005-10-27 15:12:06
- pollo
- Member
- Registered: 2005-02-17
- Posts: 22
Re: Selectors? CSS? New guy here.
Ok
I went through the site. I think I can combine a pseudo-class with a class to differentiate H3 links from p links. I think.
But how does a:link in the css control the links? Where in TXP can I control how txp:permlink is formatted? How do I tie that in to the css?
I must be missing something so simple.
p
Last edited by pollo (2005-10-27 15:14:15)
Offline
Re: Selectors? CSS? New guy here.
TXP’s tags only exist inside TXP; when your actual site is rendered, the TXP tags will be nowhere to be seen, because they’ll have been replaced with whatever HTML they generate. Write your CSS to affect that HTML.
For example, the txp:permlink
tag generates a link, using an a
tag. So what selector would you use to style that a
tag?
You cooin’ with my bird?
Offline
#6 2005-11-03 15:53:54
- pollo
- Member
- Registered: 2005-02-17
- Posts: 22
Re: Selectors? CSS? New guy here.
That makes sense. I guess I just need to work with CSS more. I am just having trouble figuring out how to make regular links look one way and links that are an article title look another. Right now the article links are 12 pt, as are the article titles (since they are links). So how do I create a selector that will recognize article title links as different from paragraph text links?
Thanks.
Offline
Re: Selectors? CSS? New guy here.
you could assign your article title a class and give the class:hover properties
best thing to do would be to go through the code of the templates in textgarden good luck
Offline
#8 2005-11-04 21:45:31
- pollo
- Member
- Registered: 2005-02-17
- Posts: 22
Re: Selectors? CSS? New guy here.
Thanks! I will.
p
Offline
#9 2005-11-04 22:01:01
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Selectors? CSS? New guy here.
If your title links always occur within a certain tag, say a heading: <h2><a href="/link-to-post">My Post Title</a></h2>
then you can just do
<pre><code>h2 a {
/* put your property values here */
}</code></pre>
Offline
#10 2005-11-22 03:46:00
- pollo
- Member
- Registered: 2005-02-17
- Posts: 22
Re: Selectors? CSS? New guy here.
Thanks to Mary and Shishira and others for offering suggestions. Unfortunately, I just can’t seem to solve this problem.
There must be somehting stupid that I am overlooking. But it just seems like the perma link tag is overriding anything I throw at it.
Hours and hours spent on this….
Offline
Re: Selectors? CSS? New guy here.
Pollo,
Its not the permlink tag.
To reiterate ubernostrum, the php tag outputs regular html.
If you are working inside your article,
find the < div > you are inside.
If it is <code><div class=“article”></code>
You should be able to style it like so:
<code>
.article a {
font-size: 12px;
line-height: 13px;
color: #333;
text-decoration: underline;
}
.articla a:hover {
color: #CCC;
}
</code>
This will make your article links go from dark grey to light grey.
Its possible that you may have some css that is overriding your article styling?
I’m not a whiz at this, but I know there is a heirarchy that needs to be obeyed.
Hope that helps,
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#12 2005-11-22 04:59:00
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Selectors? CSS? New guy here.
another tip is to be complete — specify everything … e.g.
a:link {color: #34301F;text-decoration:none}
a:visited {color: #34301F;text-decoration:none}
a:hover {color: #34301F;text-decoration:none}
a:active {color: #34301F;text-decoration:none}
h4 a:link {color: #000;text-decoration:none}
h4 a:visited {color: #000;text-decoration:none}
h4 a:hover {color: #000;text-decoration:none}
h4 a:active {color: #000;text-decoration:none}
.content a:link {color: #34301F;text-decoration:underline}
.content a:visited {color: #34301F;text-decoration:underline}
.content a:hover {color: #34301F;text-decoration:underline}
.content a:active {color: #34301F;text-decoration:underline}
and also check for the cascading bit of CSS if your rule changes are not showing on screen… is something with greater specificity (new word if it wasn’t one before) overriding your anchor styles
Offline