By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,665 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

n00bie css problem.

P: 8
I've made this simple HTML site implemented using frames but I fear that using frames has complicated applying the .css .

Here's the site:
click me
I had serious trouble making the .css filter through tables although I eventually found the fix to that problem. Some of the code in my .css is uneccessary so it may look a little messy. Feel free to suggest what I can delete while maintaining functionality.

My current problem is that I have links in the main frame and the menu frame but I want the links in the main frame to be a colour other than black ie orange because they're tricky to see against the dark blue background atm.

Here's the site zipped up:
click me
Mar 16 '07 #1
Share this Question
Share on Google+
5 Replies


drhowarddrfine
Expert 5K+
P: 7,435
The anchors are what have to be styled so in the main page you need:

a:link{
color:white;
}
then you can also add:
a:visited{
color: pink;
}
and so on.
Mar 16 '07 #2

P: 8
The anchors are what have to be styled so in the main page you need:

a:link{
color:white;
}
then you can also add:
a:visited{
color: pink;
}
and so on.
I think I've already done what you've suggested. If you haven't looked at my .css here's the contents:

h1
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 24px;
text-align: center;
}

h2
{
font-family: Verdana;
color: white;
font-size: 18px;
text-align: center;
}

h3
{
font-family: Verdana;
color: white;
font-size: 14px;
}

/*attempted to develop a different style for e-mail addresses*/

body.e-mail
{
font-family: Verdana;
color: green;
text-decoration: none;
font-size: 13px;
}

/* required?

table.centertable td
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 13px;
text-align: center;

}

table.lefttable td
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 13px;
text-align: left;

}

a.leftmenu
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 13px;
}
*/

a:hover
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:visited
{
font-family: Verdana;
color: gray;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:link
{
font-family: Verdana;
color: orange;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:active
{
font-family: Verdana;
color: blue;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

/* Below is my attempt to define default values for tables etc. This was my solution to tables not behaving like the .css instructed. Im not entirely sure why it works though :S */


body, th, p, ol, ul, blockquote, table

{
font-size: 13px;
color: white;
font-family: Verdana;
background: #132F62;
}

table.navigation

{
font-size: 13px;
color: pink;
font-family: Verdana;
background: #759BD3;
}
Mar 16 '07 #3

drhowarddrfine
Expert 5K+
P: 7,435
Yes, I did not notice them. The problem is they are getting redefined later in the flow. So you have to move them to the bottom of your css. Then it will work.
Mar 16 '07 #4

P: 8
Yes, I did not notice them. The problem is they are getting redefined later in the flow. So you have to move them to the bottom of your css. Then it will work.
I shall have a play Monday and let you know how I get on. Thanks
Mar 16 '07 #5

P: 8
Yes, I did not notice them. The problem is they are getting redefined later in the flow. So you have to move them to the bottom of your css. Then it will work.
It didn't work for me. Perhaps I misunderstood your reply. I've posted the modified css below. I still can't change the link colours independently.

h1
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 24px;
text-align: center;
}

h2
{
font-family: Verdana;
color: white;
font-size: 18px;
text-align: center;
}

h3
{
font-family: Verdana;
color: white;
font-size: 14px;
}


/* !!!IMPORTANT!!! Default attributes for text defined below (note to self: THESE DEFAULT? ie they arent) */


body, th, p, ol, ul, blockquote, table

{
font-size: 13px;
color: white;
font-family: Verdana;
background: #132F62;
}

table.navigation

{
font-size: 13px;
color: pink;
font-family: Verdana;
background: #759BD3;
}

a:link
{
font-family: Verdana;
color: black;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:hover
{
font-family: Verdana;
color: white;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:visited
{
font-family: Verdana;
color: gray;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:link
{
font-family: Verdana;
color: orange;
text-decoration: none;
font-size: 13px;
font-weight: bold
}

a:active
{
font-family: Verdana;
color: blue;
text-decoration: none;
font-size: 13px;
font-weight: bold
}
Mar 29 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.