467,161 Members | 1,086 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

n00bie css problem.

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
  • viewed: 1094
Share:
5 Replies
drhowarddrfine
Expert 4TB
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
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 4TB
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
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
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.

Similar topics

reply views Thread by Bruce Davis | last post: by
11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
3 posts views Thread by bsagert@gmail.com | last post: by
3 posts views Thread by bsagert@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.