PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Sep 29, 2020 2:30 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Nov 12, 2014 12:41 am 
Offline
Forum Commoner

Joined: Fri Oct 10, 2014 2:30 am
Posts: 33
I am setting up a webpage, and have set the color for the links, in rest state and hover state. However, how can I add a portion of code so that a section of the text will have different color in rest state and hover state?


Top
 Profile  
 
PostPosted: Wed Nov 12, 2014 7:33 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Add a class to the text and set a hover rule on the class.

Syntax: [ Download ] [ Hide ]
p.some-class:hover {
    color: green;
}


Syntax: [ Download ] [ Hide ]
<p class="some-class">Lorem ipsum dolor sit amet...</p>

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group