PDA

View Full Version : Link Colour Problems


Adam_G
07-23-2008, 11:37 AM
Please feel free to talk to me like an idiot - I am!

I'm really struggling to set up css styles for links and I've searched for similar threads and still can't make it work.

There's a link on evey page of my site that is white text over a blue background, so I set the link colour and roll-over properties in the 'page properties' dialogue box.

However, on the links page, I want to create links that are green text on a white background, but everytime I assign a URL destination to the text, it reverts to white as per the page properties instruction.

How do I set up a seperate style that will override the page properties? Sorry, but I'll really need walking through this as I'm rather dim!

The site is www.alansalisburyltd.co.uk if it helps to have a look...

Big thanks in advance...

edbr
07-23-2008, 11:54 AM
you need to style your links. this is by styling the a tag, or creating a different class. heres a for example for you
a{
color: #006699;
background-color: inherit;;
text-decoration: none;
}

a:link{
color: #006699;
background-color: inherit;
text-decoration: none;
}

a:visited{
color: #006699;
background-color: inherit;
text-decoration: none;
}

a:hover{
color: #006699;
text-decoration: none;
background-color: inherit;
text-align: left;
}

Adam_G
07-23-2008, 12:12 PM
Thanks edbr, so do I just set up a class style and then past that code into the relevant part of the code? Sorry, I'm really new to web design so I'm not particularly conversant with coding - I'm strictly Dreamweaver menus at the moment!

edbr
07-23-2008, 12:18 PM
could do, so instead of above you get
.quicklink a:link {color:#09c;font-size:12pt;
font-family:book antiqua,Trebuchet MS;
font-weight:normal;
text-align:center;
text-decoration:none;}
.quicklink a:visited {color:#09c;font-size:12pt;
font-family:book antiqua,Trebuchet MS;
font-weight:normal;
text-decoration:none;
text-align:center;}
.quicklink a hover{color:#FF0000;font-size:12pt;
font-family:book antiqua,Trebuchet MS;
font-weight:normal;
text-decoration:none;
text-align:center;}

co a link class quick link would be different than other links.
Hope you get this but i am rushing out the door! someone else will help if not i am sure

Adam_G
07-23-2008, 02:30 PM
Excellent, sorted it now thanks edbr. And thanks for the deliberate mistake in the code, took me ages to find it, but I'm a far better coder as a result! :)

Cheers!
(PS. Feel free to offer any feedback on the site - it's a work-in-progress as the client hasn't provided me with any photgraphs yet, but as I'm a novice, any constructive criticism would be gratefully received and tken onboard)

Adam

Corrosive
07-23-2008, 02:39 PM
Feel free to offer any feedback on the site - it's a work-in-progress as the client hasn't provided me with any photgraphs yet, but as I'm a novice, any constructive criticism would be gratefully received and tken onboard

OK, looks great, nice, simple design. Not too cluttered and all the info is accessible/easy to find.

You might want to think about having it centred on the page though.

Adam_G
07-23-2008, 03:06 PM
Hi Corrosive

Thanks for the positive feedback, I will centre it eventually - when it's finally approved.

I centred the first site I did using the CSS tutorial - after you suggested it a few weeks ago - and it seemed to make it more troublesome to amend things afterwards, so I think I'll do that as the final job and keep a copy of it uncentred for future alterations.

Adam_G
07-23-2008, 04:29 PM
BTW, if anyone can work out why the first box on the contact form is shunted about 10px over to the right, please let me know - it might restore my will to live! :D

Corrosive
07-23-2008, 06:36 PM
it seemed to make it more troublesome to amend things afterwards

That's because you are still using tables for your layout. Use CSS and Div Tags for your whole site.