Jump to content

Link colors on 2 separate pages


Guest apotterdd

Recommended Posts

Guest apotterdd

Hi. Newbie to the forum.

 

I'm building a site and am in need of a little bit of help. My css knowledge isn't beyond basic so bear with me.

 

I have a main css file that I use for the entire site and all works well with that except for my links page. I've been trying to overwrite the main css just for one part of the page but it ends up overwriting it for the entire page which isn't good. I've tried inline css on the links page and I've tried divs but can't get it to work right unless I was doing it wrong I don't know.

 

Not sure what else to do. the site is http://www.countryautoglass.com the links page is what I'm trying to correct.

 

The css code:

 

BODY {background: #ffffff; font-family:verdana}
TEXT {font-family:verdana}
A:link {color: #ffffff}
A:visited {color: #ffffff}
A:hover {COLOR:#FFFF3E; FONT-FAMILY:verdana; TEXT-DECORATION: underline overline}
TD {font-family:verdana;}

 

I want the links under the navigation bar to stay black and the navigation bar to stay how I have it in the main css file. Couldn't find the info I needed in the help or searching the forums.

 

Any help or advice is appreciated,

 

Anita

Link to comment
Share on other sites

For starters, you are missing the doctype - that's IMPORTANT, so add:


to the top of your code. Note that this is an HTML not an XHTML docytpe, so you need to remove some of the closing slashed (

instead of

for example) from your site.

 

The

tag that you start out with has been deprecated and SHOULD NOT be used. You can center your page with CSS (http://www.csstutorial.net/2010/02/how-to-create-a-center-aligned-page-with-css/).

 

Then you're using tables for layout which is also a totally outdated technique - use CSS for styling AND positioning.

 

Put your navigation inside a div - for example

Home | About Us | Gallery | Contact | Links

 

Then in your CSS, style this part like so:

 

#navigation a:link {............;}

#navigation a:visited {......;}

#navigation a:hover {..........;}

#navigation a:active {.......;}

 

and then you can style your regular links without the #navigation part.

 

And technically, your navigation list is a list and should be coded with

  • and
  • tags.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...