Part of the EllisLab Network
pMachine Pro has been replaced by ExpressionEngine, our full featured web publishing solution. Please consider upgrading.
You can download pMachine Pro here: Download pMachine Pro  |  Download Language Packs
   
 
Making post titles live links
Posted: 22 December 2005 07:47 AM   [ Ignore ]  
Lab Assistant
RankRank
Total Posts:  172
Joined  2005-11-07

I have managed to make the titles of each post a permalink in themselves - but they are using the uniform style for all links on my blog.

What I would like to do is create a new css style specifically related to the post titles, which will alternate background and text colour on a hover as per my example screenshots attached - which show the same post with cursor hover and without. I would be grateful if someone could give me some guidance on how to create the CSS code for this.

Thanks

File Attachments
Header Eg.png  (File Size: 134KB - Downloads: 129)
Profile
 
 
Posted: 24 December 2005 05:06 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRank
Total Posts:  2188
Joined  2002-12-06

Here’s what I have on boyink.com (note that I use the comments page for the permalink, comments, and “more” page)

Template code:

<div class="entry"
<h2><a href="%%comments_url%%">%%title%%</a></h2>

Entries are wrapped in the #leftcolumn container, so the following CSS styles the <h2> entry titles:

#leftcolumn h2 {
padding: 0px;
margin-top: 16px; margin-bottom: 0px; margin-left:-2px; margin-right:0;
font-family: georgia, "Times New Roman", serif;
font-size: 135%;
text-align:left;
font-weight:bold;
color:#1C1D58;
}



#leftcolumn h2 a {
color: #1C1D58;
text-decoration:none;
}

#leftcolumn h2 a:visited {
color:#1C1D58;
text-decoration:none;
font-weight:bold;
}

#leftcolumn h2 a:hover {
color:#999933;
text-decoration:none;
}

To do the switching of h2 you’ll have to define both in CSS then use the “%%color_switch%%” variable in your weblog template, setting the colors under “Weblog Management - Row alternating color one and two”.

 Signature 

Train-ee.com - Hosting the 1st EE Classroom Training Sept. 9-12 in Holland, MI USA. Register Now!

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 233, on December 18, 2007 12:04 AM
Total Registered Members: 61024 Total Logged-in Users: 0
Total Topics: 73808 Total Anonymous Users: 0
Total Replies: 398135 Total Guests: 34
Total Posts: 471943    
Members ( View Memberlist )
Newest Members:  b-rodMAIDENtreatstruckaungAdrian LeonP.T.Aoochoi2kfantomelIfTrueElseFalse
Active Members: