4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Lazy Question on CSS
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Aug 07, 2003 9:10 am (20 years, 8 months ago) Reply with QuoteBack to Top

Hi,

I want to create a CSS Style named left which does the following things for the parts of the page that I define as the class left :

- Makes all links that are defined as the left class which are not being rolled over plain white with no underline.

- When the link is rolled over, it changes colour to #6699FF but stays without an underline.

If someone could produce the CSS for me I would appreciate it, as I can't seem to get it right!

Thanks

Justin
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Thu Aug 07, 2003 9:33 am (20 years, 8 months ago) Reply with QuoteBack to Top

.left a:link { color: #FFFFFF; text-decoration: none }
.left a:hover { color: #6699FF; text-decoration: none }

That does it, but not if you apply it directly to the <a> tag - e.g. the class needs to go in a div etc
I don't know why but thats the only way I could get it to work Laughing
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Thu Aug 07, 2003 9:41 am (20 years, 8 months ago) Reply with QuoteBack to Top

yes you can I was writing it wrong, this works:

a.left:link { color: #FFFFFF; text-decoration: none }
a.left:hover { color: #6699FF; text-decoration: none }

<a href="#" class="left">Link 1</a>
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Thu Aug 07, 2003 10:20 pm (20 years, 8 months ago) Reply with QuoteBack to Top

Darren wrote:
yes you can I was writing it wrong, this works:

a.left:link { color: #FFFFFF; text-decoration: none }
a.left:hover { color: #6699FF; text-decoration: none }

<a href="#" class="left">Link 1</a>


Thanks, worked beautifully!
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
jayant
Team Member



Joined: 07 Jan 2002
Posts: 262
Location: New Delhi, India

PostPosted: Fri Aug 08, 2003 2:52 pm (20 years, 8 months ago) Reply with QuoteBack to Top

in case of "id" instead of "class" the first syntax is used
#left a:link { color: #FFFFFF; text-decoration: none }
#left a:hover { color: #6699FF; text-decoration: none }

<a href="#" id="left">Link 1</a>

________________________________
Jayant Kumar
Member of the 4WebHelp Team
Nibble Guru - Computing Queries Demystified
GZip/ Page Compression Test
OfflineView User's ProfileFind all posts by jayantSend Personal MessageVisit Poster's WebsiteYahoo MessengerMSN Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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 vote in polls in this forum.


Page generation time: 0.340099 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme