CSS Links

This is a discussion on "CSS Links" within the Web Page Design section. This forum, and the thread "CSS Links are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 14th, 2007, 18:12
New Member
Join Date: Jun 2007
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile CSS Links

Hello everyone,

I am not too good with CSS. I wanted to know if it is possible to use 2 different style sheets for links the in the same page. For example, links on the top half of the page would be blue with red rollover, and on the bottom half they would be green with no rollover. What is the best way to do this?
Thanks!
Tim
Reply With Quote

  #2 (permalink)  
Old Jun 14th, 2007, 18:15
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,636
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to Marc Send a message via Skype™ to Marc
Re: CSS Links

Read this, by Karinne: http://www.webforumz.com/css-forum/3...htm#post147452
Reply With Quote
  #3 (permalink)  
Old Jun 15th, 2007, 12:30
Junior Member
Join Date: May 2007
Location: london
Age: 26
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Links

Yes it can be done..

stylesheet.css
a:link{
link;
hover;


}


stylesheet2.css

a.green:link{color: green;
}
a.green:hover{color: green; bold;
}


then you have to set you them in your html page.


YOU MUST USE THIS LINE FOR IT TO WORK.

<link rel="stylesheet.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet2.css" rel="stylesheet" type="text/css" />


then you would you them in a class.

<a class="green" href="../index.html">This link wil go green</a>
<a href="../html.html">html</a>

I hope that this helps you. This is off the top of my head.

<notagz1>
Reply With Quote
  #4 (permalink)  
Old Jun 15th, 2007, 12:49
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Links

Why 2 stylesheets just for different links?!?

Just check the link mmfrasser linked to ... it's all in there.
Reply With Quote
  #5 (permalink)  
Old Jun 15th, 2007, 13:25
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Links

To answer the question specifically, no: this cannot be done with CSS alone. You'll need some type of HTML identifier to tell the CSS when the top of half of the page begins and ends, or when the bottom half of the page begins and ends. You'll need to surround one half in a <div> with a class or ID so that it follows a different set of rules. Make sense?
Reply With Quote
  #6 (permalink)  
Old Jun 15th, 2007, 14:06
Junior Member
Join Date: May 2007
Location: london
Age: 26
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS Links

My mistake. It goes work in one style sheet. Use a class tag not id.

<notagz1>
Reply With Quote
Reply

Tags
css, href, links

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Msie doesn't make my links links.. delusion Web Page Design 7 Nov 7th, 2007 08:05
PR4 links for sale...links in an excellent position agent14 Link Building and Link Sales 1 Mar 5th, 2007 21:33
PR 5 Links available for recip links GARY Link Building and Link Sales 1 Aug 19th, 2006 09:52
Blured Links (image links) bruno89 Web Page Design 2 Jul 25th, 2006 14:48
Different coloured links without modifying links? Webforumz Staff Web Page Design 12 Aug 29th, 2003 18:48


All times are GMT. The time now is 03:55.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43