This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
link color

How do I change a color of a link? I have seen this code a link=#ffffff

but i can't get that to work.

Re: link color

There are four main styles (Pseudo Classes) to completely manage a link color. If you include the following in your style section, you can manage the default link definition.

a:link {color: #FF0000} /* unvisited link */
a:visited {color: #00FF00} /* visited link */
a:hover {color: #FF00FF} /* mouse over link */
a:active {color: #0000FF} /* selected link */


For more information on using the CSS Pseudo Classe, see W3Schools - CSS Pseudo-classes. Their demo at Hyperlink 2 shows you how to apply different link styles to different sections using class definitions.

Re: link color

i got that but where do I put the URL in at to be able to get it to work?

Re: link color

i got this a class="one" href="default.asp" target="_blank" href is the url but what is target?

Re: link color

I take it that your are not trying to change your web page global link styles, but are only interested in the link style of one particular link. A standard link, that will use the link style defaults, might look like this:

[Text for the link]

The "target" attribute specifies how you want that link to behave when it is clicked. The "_blank" is a reserved keyword that instructs the link to open in a new window. The code might then look like this:

target="_blank">[Text for the link]

If you just want the site to open in your current browser window you could use "_top" instead of "_blank". Frames users can use other target attributes to specify where the link will open up.

But, as I said, the [Text for the link] will display according to the default link style settings. The setting I gave you previously can be used to set the default link style. To change the display of a specific link you can create a style and use a "class" declaration or use an in-line style.

An in-line style setting lets you change a specific instance of a HTML structure. Below is and example of a link that makes the text color brown, the weight bold, and removes any underline.

style="color: #8B4513; font-weight: bold; text-decoration: none;" target="_blank">Link to Anywhere.com

and would look like this: Link to Anywhere.com

To do this same thing with a style you might use something like this:



class="MyLink" href="http://www.anywhere.com/" target="_blank">Link to Anywhere.com


I can't show you this in this forum, because the forum overrides the actual style setting, but with this style placed in the of your page, the link will be normally brown (link and active). But it will turn black when a cursor is over it (hover), and turn red after it is used (visited).

Re: link color

thanks for all your help

Re: link color

okey I got the code to work the color changes when I hover over a link and stuff but not to the color I want.

I used #ffffff wich is white for link color
and #ff440 wich is a blue color for hover and when I previw my site I get pick and white?

Re: Re: link color

#ff440 is missing a digit so it will be ignored. You need 6 digits for the colour not five.

Re: Re: Re: link color

my bad I went back and checked it it is #ff4400

Re: link color

This is the color "#ffffff"
This is the color "#ff4400"

Is that anything like what you're seeing?
As you can see, #ff4400 is not blue, but sort of orange.

Re: link color

no it comes up on the page pink and when I go over it it is white check it our at www.dalewillard.bravehost.com

Re: link color

and now no matter what i change the color code to it stays the same

Re: link color

Come on -- if you're applying a specific style to just one link on a page, and the page has twenty or thirty links, what are we supposed to look for?

Think!

Re: link color

a.one:link {color: #ff0000}
a.one:visited {color: #0000ff}
a.one:hover {color: #ffcc00}

a.two:link {color: #ff0000}
a.two:visited {color: #0000ff}
a.two:hover {font-size: 150%}

a.three:link {color: #ff0000}
a.three:visited {color: #0000ff}
a.three:hover {background: #66ff66}

a.four:link {color: #ff0000}
a.four:visited {color: #0000ff}
a.four:hover {font-family: monospace}

a.five:link {color: #ff0000; text-decoration: none}
a.five:visited {color: #0000ff; text-decoration: none}
a.five:hover {text-decoration: underline}

i AM USING THIS CODE FROM http://www.w3schools.com/css/tryit.asp?filename=trycss_link2 FOR ALL THE WEB LINKS ON THE RIGHT SIDE JUST THE WEB SITE LINKS AND NO MATTER WHAT COLOR I PUT IN THERE IT STAYS THE SAME PINK AND WHEN I HOVER WHITE

Re: link color

Try this:

a.one:hover {color: #FF4400 !important}

It will work, I think, you add "!important" (no quotes) to each of those "a." style definitions.

Someone else may be able to find an easier way.

The CSS you're trying to use will work fine, standalone, but not, as-is, when it's embeded in a Wizard (guess that's what you're using) page.

Re: link color

I meant to say:

a.one:hover {color: #ff4400 !important}

not FF. Just a typo.

Re: link color

nope that did not change anything

Re: link color

I don't know where you tried it, but if you try it on your site, http://dalewillard.bravehost.com/, we can check it out.

Re: link color

Not sure if you're still interested in this topic, but I think if you added the styles in your style.css file, rather than on the page itself, that could be the key to success.

Re: link color

Not sure if you're still interested in this topic, but I think if you added the styles in your style.css file, rather than on the page itself, that could be the key to success.

What I mean is, if you placed the a.one, a.two, etc., definitions in your style.css file, you might not need to add the "!important" to everything. What you want to do isn't complicated, and it shouldn't be a big problem. If you're using the Wizard, that may make things a little more difficult, but there must be a way around it. (Long-term solution: Dump the Wizard!)

Re: link color

No, you can change that till your blue in the face, and nothing is going to happen. The key word here is the Website Wizard. Ahhhhh.......

Initially I thought you were asking a generic question about how to manage link definitions. But after looking at your page I realize that you are trying to make this stuff work with the Website Wizard. It can be done, but there needs to be some adjustments.

First, there are a couple of issues. I see you have added your styles to a style declaration in the structure of the front page. Now I know that the Website Wizard does not give you access to the structure, so you must have done it with a different editor. If you still intend to continue to create your site from within the Website Wizard, you will need to stop using an external editor. The Website Wizard keeps all of your web site information in a data base. When you use the "publish website" button, the Wizard will take your data base data, insert it into HTML documents, and then will overwrite your existing web pages. You have some minor control over what pages are actually published, from the "Publish Website" page, but that's it.

The styles of the links that you are trying to change, are being controlled by your "style.css" file. The links are in a

structure that looks like this:



[Your Links]



If you look in the "style.css" file, you will see two styles that says:

#extraContent a, #extraContent a:visited, #extraContent2 a, #extraContent2 a:visited
{
color : #cca4a4;
}

#extraContent a:hover, #extraContent2 a:hover
{
color : #ccb8b8;
}


These styles are saying that, in any
structure that has a "id" setting of "extraContent", the links will behave as specified in this style. With the "id" selector you can define the same style for different HTML elements. So this is overriding the other style setting that you are creating. To make the links that are in the
structures with a "id" of "extraContent", you need to change, or override, those styles.

If you go to this Dale Willard Test Page, you will see that the color changing is possible, which is a copy of you front page. All I did here was change the color definitions in the "style.css" file. Note that this also changes the link behavior for your LINKS and MOVIE QUOTES side bars, but not the Navigation and Things To Do sidebars. Those sidebars are managed by a different style. If you are going to continue to use the Wizard, you can the style settings right in one of your content areas. For the colors you specified, the styles should look like this:



In conclusion (aren't you glad to hear that?), if you continue to use the Wizard, this is a hack, is very error prone, difficult to maintain, and the setting will only affect the current page. If you are going to be working outside of the Wizard, put all this stuff in a CSS file and start reading up on "Cascading Style Sheets" and how to make them effective in your documents.

Re: link color

Thank you so much that did the trick. That was going to be my next question was if I could change the font of the servisec links and page links