Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 02-21-2006, 01:16 PM Simple answer needed
scottsgameroom's Avatar
Super Talker

Posts: 101
Trades: 0
This is a really simple question that needs a simple answer.

Is there ne way of changing the colour of links half way through you HTML coding?

I am working on a very large html based file, but i want to change the colour of the link hald way through the page for "undisclosed" reasons! and then change them back again!

I know you normally define the colours in the <body> tag. Is there ne way to change them half way through your coding?
scottsgameroom is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-21-2006, 01:54 PM Re: Simple answer needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use CSS and add a class for those links
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-21-2006, 05:04 PM Re: Simple answer needed
scottsgameroom's Avatar
Super Talker

Posts: 101
Trades: 0
I am a bit of a rookie when it comes to CSS so is there any way of doing it with HTML?

If not could oyu provide an example CSS normal link and adapted link and how they are useD?

Thanks in advance
scottsgameroom is offline
Reply With Quote
View Public Profile
 
Old 02-21-2006, 07:15 PM Re: Simple answer needed
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
On the links you want to change color you would add a class like:

<a class="red" href="" ...>

and then in the head of your document you would have code that might look something like:

a.red {color:red}

You could also use the hexidecimal value for red which is the standard practice

a.red {color:#ff000}

The name red was just arbitrary for this example. it can be anything, though should start with a letter and can't start with a number. The . in the css stands for class so the css above is like saying for the <a> tag with a class of red applied make the color of the link red.

The css you place in the head of your document needs code around it that looks like:

<style type="text/css">
a.red {color:#ff000}
</style>

There are other ways to add css to a document such as including your css from am external flle or even adding styles directly to html elements, which are called inline styles.

The way I described above will probably be easiest for you. For any link you want to have the new color just add class="red" (or whatever name you give to the class) and they'll all be whatever color you set in the css.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to Simple answer needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14313 seconds with 12 queries