PDA

View Full Version : Link colour work only on some pages, why is this?


thedon
08-31-2009, 04:57 AM
Hi,
I have changed my text link colours in page properties and it worked on my homepage fine. But it doesnt work on my other pages, it works on say 50%, but the other page just stays the same colour, why is this?

DWcourse
08-31-2009, 05:08 AM
We'd need the url so we can see the site but it might have to do with the color of the visited links.

thedon
08-31-2009, 05:12 AM
http://www.thai-discovery.com I chanhed the rollover and visited link colors too. It all works fine on the index in dreamweaver CS3, but some pages I try and edit in page properties it just does nothing. Stays blue and when I go into page properties again it is like it just ignored my last request as it has gone back to the original state

edbr
08-31-2009, 07:12 AM
did you try to add a a:link a:hover a:visited, i dont see them on your page but is that whatyou could not edit?

thedon
08-31-2009, 07:21 AM
Ok, As you see in my homepage on the right under "Thailand Forum discussions", the links font color is light purple with a white rollover. but if you go up and click on Bangkok in my menu you will go to bangkok page and the link colour does not change when I change the page properties in dreamweaver.
Any idea's?

Corrosive
08-31-2009, 09:13 AM
There is nothing in your code on page view-source:http://www.thai-discovery.com/bangkok.html to style the link colours so it has defaulted to dark blue. In the first page you asked us to look at you have this CSS code;

a:link {
color: #F7E9FC;
}
a:visited {
color: #F7E9FC;
}
a:hover {
color: #FFFFFF;
}

This is what is styling your links. Simple really, the code exists in one page so it works, doesn't exist in another page...so it doesn't.

You could easily save all of this by creating an external stylesheet with your site-wide styles (such as links) and linking it in to every page. This would prevent you having to go back through all the pages in the future if you need to make changes. You can do it once and the change 'cascades' down through your pages.

thedon
08-31-2009, 09:23 AM
There is nothing in your code on page view-source:http://www.thai-discovery.com/bangkok.html to style the link colours so it has defaulted to dark blue. In the first page you asked us to look at you have this CSS code;

a:link {
color: #F7E9FC;
}
a:visited {
color: #F7E9FC;
}
a:hover {
color: #FFFFFF;
}

This is what is styling your links. Simple really, the code exists in one page so it works, doesn't exist in another page...so it doesn't.

You could easily save all of this by creating an external stylesheet with your site-wide styles (such as links) and linking it in to every page. This would prevent you having to go back through all the pages in the future if you need to make changes. You can do it once and the change 'cascades' down through your pages.
Wonderful, I just tested this and it worked. Dreamweaver gives me headaches at times. but I only started webdesigning a few months ago.
Thanks

Corrosive
08-31-2009, 09:37 AM
External style sheets would help a lot. You have a lot of inline styles in every page.

thedon
08-31-2009, 09:58 AM
How do I do that? And what do you mean?

Corrosive
08-31-2009, 10:25 AM
How do I do that? And what do you mean?

OK, cascading stylesheets;

Used to separate style from content. You HTML page has your content in its raw form and then you link in a stylesheet to add the colours, graphics, div positions etc. The stylesheet is linked to every page so, if you want to update your link colours, you only need to do it in your stylesheet and the change 'cascades' down through your other pages. It gives you control of your website from a single document.

Try view-source on my website yotocreative.co.uk and you'll see this link <link href="css/main.css" rel="stylesheet" type="text/css">

That links my styles to every page and you'll see that I only have one 'inline' style where that is specific to the page you are on.

Understand?