468,768 Members | 1,702 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Need help changing anchor text color in this style declaration

<style>
div div table tr td a.navbar, div div table tr td font {display:
none;}
</style>
<div class="navigationbar" style="background-color:Black; position:
absolute; left:50%; top:127px; margin-left: -400px; width: 800px;
height: 26px">
<!-- CODE GOES HERE -->
</div>

I am unable to change the color of the anchor tag text within the <div>
tags. I know it involves a particular CSS declaration involving color,
but no matter where I put it it fails to change to the color I declare.

What should I do?

Thanks
Phil

Apr 19 '06 #1
15 3597
ph**************@gmail.com wrote:
What should I do?


You should post a URL to the real code.

These things aren't diagnosable through tiny unrepresentative samples -
especially when you didn't even post the element you were having the
problem with.

Chances are though that it's either a selctor that's too specific and
so isn't matching anything at all, or else there's another CSS rule in
effect that is being even more specific and so is forcing itself onto
the element instead.

Apr 19 '06 #2

Andy Dingley wrote:
ph**************@gmail.com wrote:
What should I do?
You should post a URL to the real code.


http://www.myspace.com/nordicmetalhead

These things aren't diagnosable through tiny unrepresentative samples -
especially when you didn't even post the element you were having the
problem with.

Chances are though that it's either a selctor that's too specific and
so isn't matching anything at all, or else there's another CSS rule in
effect that is being even more specific and so is forcing itself onto
the element instead.


Just in case here's the whole offending code:

<STYLE>a, a.man, a:link, a:visited{font-family:georgia, arial, times
new roman;color:CC0000; font-size:8pt; font-weight:normal;
text-decoration:none; font-style:normal} a:active,
a:hover{font-family:georgia, arial, times new roman;color:CC0000;
font-size:8pt; font-weight:normal; text-decoration:underline;
font-style:normal;}td, table, tr, span, li, p, div, textarea, DIV, s9,
s10, regular {font-family:georgia, arial, times new roman;color:;
font-weight:normal; font-decoration:none;
font-style:normal;background-color:transparent} td, li, p, div,
textarea {font-family:georgia, arial, times new
roman;border-color:CC0000}
table{border-color:}a.navbar{font-family:georgia, arial, times new
roman;font-size:8pt; font-weight:normal} a.navbar:link{color:CC0000;}
a.navbar:active{color:CC0000;} a.navbar:visited{color:CC0000;}
a.navbar:hover{color:CC0000;}a.searchlinkSmall{fon t-family:georgia,
arial, times new roman;font-size:8pt; text-decoration:none;
font-weight:normal;} a.searchlinkSmall:link{color:}
a.searchlinkSmall:active{color:CC0000}
a.searchlinkSmall:visited{color:}
a.searchlinkSmall:hover{color:CC0000}body{font-family:georgia, arial,
times new
roman;background-color:EEEEDD;background-image:url(http://valsignalandet.com/images/bg.jpg);
background-position:0%; background-repeat:repeat;
background-attachment:fixed;}.nametext{font-family:georgia, arial,
times new roman;font-size:8pt;color:;
font-weight:normal;}.blacktext10{font-family:georgia, arial, times new
roman;font-size:8pt; color:;
font-weight:normal;}.blacktext12{font-family:georgia, arial, times new
roman;font-size:8pt; color:; font-weight:normal;}.btext, .itext,
..text{font-family:georgia, arial, times new roman;font-size:8pt;
color:; font-weight:normal;}.orangetext15{font-family:georgia, arial,
times new roman;color:;
font-weight:normal;}.lightbluetext8{font-family:georgia, arial, times
new roman;font-size:8pt; color:;
font-weight:normal;}.tmz_imp{font-family:arial;color:FF0000;font-weight:bold}a
img{}a:hover
img{}body{scrollbar-arrow-color:;scrollbar-Track-Color:EEEEDD;scrollbar-Highlight-Color:;scrollbar-base-color:;scrollbar-Face-Color:EEEEDD;scrollbar-Shadow-Color:;scrollbar-DarkShadow-Color:</STYLE><embed
allowScriptAccess="never" style='display:none' src=''
AUTOSTART='True' LOOP='1'><div align=center><a
href=http://www.layoutpimper.com target=_blank><img
src=http://i11.photobucket.com/albums/a167/myspacepimper/layout.gif
alt=Layoutpimper.com Free Layout Editor for Myspace and Teenchill.com
width=200 height=50 border=0><BR>www.layoutpimper.com</a></div>

<style>div div table tr td a.navbar, div div table tr td font {display:
none;}</style><div class="navigationbar" style="background-color:Black;
position: absolute; left:50%; top:127px; margin-left: -400px; width:
800px; height: 26px">
<table width="800" height="26" border="0" cellspacing="0"
cellpadding="0">
<tr valign="middle">
<td align="center">
<a href="http://home.myspace.com/index.cfm?fuseaction=user">Home</a>
|

<a
href="http://mail.myspace.com/index.cfm?fuseaction=mail.inbox">Mail</a>
|

<a
href="http://blog.myspace.com/index.cfm?fuseaction=blog.controlcenter">Blog</a>
|

<a
href="http://forum.myspace.com/index.cfm?fuseaction=messageboard.categories">Foru m</a>
|

<a
href="http://groups.myspace.com/index.cfm?fuseaction=groups.categories">Groups</a>
|

<a href="http://valsignalandet.com">V&auml;lsignalandet</a>
|

<a href="http://www.thosewhomourn.com">Those Who Mourn</a>
</tr></td></table></div>

<table align="center" border="0">
<tr>
<td bgcolor="000000">
<a href="http://valsignalandet.com" target="_new">
<img
src="http://valsignalandet.com/images/dreamfoto/a_whole_new_phil.jpg"
border="0" alt="A Whole New Phil - The Goth Version" width="200"
height="120">
</a>
</td>
<td bgcolor="000000" valign="top">
<a href="http://valsignalandet.com" target="_new">
<font color="000099" face="Magdeburg, Music Hall, Fette Fraktur,
Monotype Corsiva, Arial Narrow, Georgia, Verdana, Arial" size="+5">
Vad &auml;r det? Vad heter den tokig snubbe?
</font>
</a>
</td>
</tr>
</table>

<font face="Music Hall, Copperplate Gothic Bold, Arial Narrow, Georgia,
Verdana, Arial, Helvetica, sans-serif" size="+2" color="cc0000">

<a href="http://valsignalandet.com" target="_new"><font
face="Magdeburg, Fette Fraktur, Monotype Corsiva, Copperplate Gothic
Bold, Georgia, Verdana, Arial, Helvetica, sans-serif" size="+2">My
freakish corner of the world</font></a><br><br>

<a href="http://www.thosewhomourn.com" target="_new"><font
face="Magdeburg, Fette Fraktur, Monotype Corsiva, Copperplate Gothic
Bold, Georgia, Verdana, Arial, Helvetica, sans-serif" size="+2">Where I
am lead to be</font></a><br><br>

??-year old programmer, gothic metalhead, metallic goth, Pratar
Svenska, but thinks the Uncaused Cause of the Universe must exist for
everyone to know!

</font>

Apr 19 '06 #3
ph**************@gmail.com wrote:
Andy Dingley wrote:
ph**************@gmail.com wrote:
What should I do?


You should post a URL to the real code.


http://www.myspace.com/nordicmetalhead


Warning: turn down your speakers before visiting.

Perhaps this will help?
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F www.myspace.com%2Fnordicmetalhead>

That is quite a jumble of CSS used. I'd recommend starting over, after
learning about the Cascading part of Cascading Style Sheets.

Not to mentioned tables nested .. four? .. deep?

--
-bts
-Warning: I brake for lawn deer
Apr 19 '06 #4

Beauregard T. Shagnasty wrote:
ph**************@gmail.com wrote:
Andy Dingley wrote:
ph**************@gmail.com wrote:

What should I do?

You should post a URL to the real code.
http://www.myspace.com/nordicmetalhead


Warning: turn down your speakers before visiting.

Perhaps this will help?
<http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F www.myspace.com%2Fnordicmetalhead>

That is quite a jumble of CSS used. I'd recommend starting over, after
learning about the Cascading part of Cascading Style Sheets.


That won't help at all; MySpace restricts even the type of tags you are
allowed to use, thus, using valid HTML is not a guarantee simply due to
the content-management-related restrictions imposed by MySpace.

That's why I posted just the code snippet because I knew it'd be near
impossible for someone to follow that block of jumbled code to fix, but
the navigation bar at the top is the problem; I want to change the
color of the linked text to a more readable color.

Phil


Not to mentioned tables nested .. four? .. deep?

--
-bts
-Warning: I brake for lawn deer


Apr 19 '06 #5
ph**************@gmail.com wrote:
Beauregard T. Shagnasty wrote:
Perhaps this will help? <http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F www.myspace.com%2Fnordicmetalhead>

That is quite a jumble of CSS used. I'd recommend starting over,
after learning about the Cascading part of Cascading Style Sheets.
That won't help at all; MySpace restricts even the type of tags you
are allowed to use, thus, using valid HTML is not a guarantee simply
due to the content-management-related restrictions imposed by
MySpace.


They disallow 'tags' in CSS? Doesn't seem likely. Note I referenced your
CSS and not your HTML.
That's why I posted just the code snippet because I knew it'd be near
impossible for someone to follow that block of jumbled code to fix,
but the navigation bar at the top is the problem; I want to change
the color of the linked text to a more readable color.


Again, if you fix all the errors in your CSS, you may find the problem
you are having will disappear. Browsers have the right to ignore
some/all of the CSS if they encounter errors.

You could probably reduce your CSS from 845 lines to about a quarter of
that if it was written taking advantage of Cascading, and not writing a
class for each and every font size which redefines everything, instead
of just changing the size itself. (Hope that is clear enough. <g>)

--
-bts
-Warning: I brake for lawn deer
Apr 19 '06 #6

Beauregard T. Shagnasty wrote:
ph**************@gmail.com wrote:
Beauregard T. Shagnasty wrote:
Perhaps this will help? <http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2F www.myspace.com%2Fnordicmetalhead>

That is quite a jumble of CSS used. I'd recommend starting over,
after learning about the Cascading part of Cascading Style Sheets.
That won't help at all; MySpace restricts even the type of tags you
are allowed to use, thus, using valid HTML is not a guarantee simply
due to the content-management-related restrictions imposed by
MySpace.


They disallow 'tags' in CSS? Doesn't seem likely. Note I referenced your
CSS and not your HTML.
That's why I posted just the code snippet because I knew it'd be near
impossible for someone to follow that block of jumbled code to fix,
but the navigation bar at the top is the problem; I want to change
the color of the linked text to a more readable color.


Again, if you fix all the errors in your CSS, you may find the problem
you are having will disappear. Browsers have the right to ignore
some/all of the CSS if they encounter errors.

You could probably reduce your CSS from 845 lines to about a quarter of
that if it was written taking advantage of Cascading, and not writing a
class for each and every font size which redefines everything, instead
of just changing the size itself. (Hope that is clear enough. <g>)


Clear as mud. I have no clue what you're talking about.

Suffice to say that you can't write #FFFFCC in MySpace because the # is
apparently not allowed, for one thing.

Phil

--
-bts
-Warning: I brake for lawn deer


Apr 19 '06 #7
ph**************@gmail.com wrote:
MySpace restricts even the type of tags you are
allowed to use, thus, using valid HTML is not a guarantee simply due to
the content-management-related restrictions imposed by MySpace.


There are 333 HTML errors, which is quite impressive. Are these really
caused by "their" HTML rather than "your" HTML? Maintenance must be an
absolute nightmare...!

Regarding your CSS, you should be able to start making life easier for
yourself by pruning your classes. For example, .blacktext10 and
..blacktext12 have identical rules:
{
font-family : georgia, arial, times new roman;
font-size : 8pt;
font-weight : normal;
}

Even those three simple rules need a bit of tidying-up:
1. A font-family declaration should end with a generic font, such as
"serif".
2. You've mixed two serif typefaces with one sans-serif.
3. "Font names containing any such characters or whitespace should be
quoted".
4. Points are not a suitable unit of measurement for screen display;
ideally you should use ems or maybe percentages, but if you must have
fixed sizes then use pixels.
5. The font-weight should probably be defined for the body instead,
and be allowed to cascade down... assuming that it's even necessary in
the first place.

The simpler your code, the easier it'll be for you to understand, and
the easier it'll be for you to maintain.
--
AGw.

Apr 19 '06 #8

freder...@southernskies.co.uk wrote:
ph**************@gmail.com wrote:
MySpace restricts even the type of tags you are
allowed to use, thus, using valid HTML is not a guarantee simply due to
the content-management-related restrictions imposed by MySpace.
There are 333 HTML errors, which is quite impressive. Are these really
caused by "their" HTML rather than "your" HTML? Maintenance must be an
absolute nightmare...!


More "theirs" than yours. You apparently can insert your own CSS, but
I don't have time for that; I have to maintain about 5 different PAID
websites and nobody's paying me to do this for myspace (it's a funsie),
and my background is more DBA/SysAdmin/web application programmer than
"UI Guy", so this isn't my field, I'd rather have someone else do it
frankly.

Phil

Regarding your CSS, you should be able to start making life easier for
yourself by pruning your classes. For example, .blacktext10 and
.blacktext12 have identical rules:
{
font-family : georgia, arial, times new roman;
font-size : 8pt;
font-weight : normal;
}

Even those three simple rules need a bit of tidying-up:
1. A font-family declaration should end with a generic font, such as
"serif".
2. You've mixed two serif typefaces with one sans-serif.
3. "Font names containing any such characters or whitespace should be
quoted".
4. Points are not a suitable unit of measurement for screen display;
ideally you should use ems or maybe percentages, but if you must have
fixed sizes then use pixels.
5. The font-weight should probably be defined for the body instead,
and be allowed to cascade down... assuming that it's even necessary in
the first place.

The simpler your code, the easier it'll be for you to understand, and
the easier it'll be for you to maintain.
--
AGw.


Apr 19 '06 #9
ph**************@gmail.com wrote:
Beauregard T. Shagnasty wrote:
Again, if you fix all the errors in your CSS, you may find the
problem you are having will disappear. Browsers have the right to
ignore some/all of the CSS if they encounter errors.

You could probably reduce your CSS from 845 lines to about a quarter
of that if it was written taking advantage of Cascading, and not
writing a class for each and every font size which redefines
everything, instead of just changing the size itself. (Hope that is
clear enough. <g>)
Clear as mud. I have no clue what you're talking about.


You did look at the validation page of your CSS that I posted?

Maybe starting here would help:
http://htmldog.com/guides/cssbeginner/
Suffice to say that you can't write #FFFFCC in MySpace because the #
is apparently not allowed, for one thing.


You are already using the # in your color codes, and they seem to work.
Example, from the top of your CSS:

..verdana12 {
<snip>
color: #000000; <-- which is black
}

--
-bts
-Warning: I brake for lawn deer
Apr 19 '06 #10

Beauregard T. Shagnasty wrote:
ph**************@gmail.com wrote:
Beauregard T. Shagnasty wrote:
Again, if you fix all the errors in your CSS, you may find the
problem you are having will disappear. Browsers have the right to
ignore some/all of the CSS if they encounter errors.

You could probably reduce your CSS from 845 lines to about a quarter
of that if it was written taking advantage of Cascading, and not
writing a class for each and every font size which redefines
everything, instead of just changing the size itself. (Hope that is
clear enough. <g>)
Clear as mud. I have no clue what you're talking about.


You did look at the validation page of your CSS that I posted?

Maybe starting here would help:
http://htmldog.com/guides/cssbeginner/


Thanx but I'm too frustrated and busy to try to figure out the
validation codes; I did check it out and it completely overwhelmed me
to the point of mental paralysis.

I wound up changing the navbar's background color to #999999 and
everything is fine. I went into the "Edit Profile" link in MySpace to
add the newly-revised CSS code via Thomas' MySpace Editor and it showed
up just fine in preview and in "Edit Profile" mode, but the live site
has no changes at least when viewed in Firefox nor Konqueror (I'm on a
Linux box so I can't verify via IE just yet)

Phil

Suffice to say that you can't write #FFFFCC in MySpace because the #
is apparently not allowed, for one thing.


You are already using the # in your color codes, and they seem to work.
Example, from the top of your CSS:

.verdana12 {
<snip>
color: #000000; <-- which is black
}

--
-bts
-Warning: I brake for lawn deer


Apr 19 '06 #11

Beauregard T. Shagnasty wrote:
ph**************@gmail.com wrote:
Beauregard T. Shagnasty wrote:
Again, if you fix all the errors in your CSS, you may find the
problem you are having will disappear. Browsers have the right to
ignore some/all of the CSS if they encounter errors.

You could probably reduce your CSS from 845 lines to about a quarter
of that if it was written taking advantage of Cascading, and not
writing a class for each and every font size which redefines
everything, instead of just changing the size itself. (Hope that is
clear enough. <g>)
Clear as mud. I have no clue what you're talking about.


You did look at the validation page of your CSS that I posted?

Maybe starting here would help:
http://htmldog.com/guides/cssbeginner/


Thanx but I'm too frustrated and busy to try to figure out the
validation codes; I did check it out and it completely overwhelmed me
to the point of mental paralysis.

I wound up changing the navbar's background color to #999999 and
everything is fine. I went into the "Edit Profile" link in MySpace to
add the newly-revised CSS code via Thomas' MySpace Editor and it showed
up just fine in preview and in "Edit Profile" mode, but the live site
has no changes at least when viewed in Firefox nor Konqueror (I'm on a
Linux box so I can't verify via IE just yet)

Phil

Suffice to say that you can't write #FFFFCC in MySpace because the #
is apparently not allowed, for one thing.


You are already using the # in your color codes, and they seem to work.
Example, from the top of your CSS:

.verdana12 {
<snip>
color: #000000; <-- which is black
}

--
-bts
-Warning: I brake for lawn deer


Apr 19 '06 #12
ph**************@gmail.com wrote:
MySpace restricts even the type of tags you are
allowed to use, thus, using valid HTML is not a guarantee simply due to
the content-management-related restrictions imposed by MySpace.


There are 333 HTML errors, which is quite impressive. Are these really
caused by "their" HTML rather than "your" HTML?

Maintaining that code must be an absolute nightmare...!

Regarding your CSS, you should be able to start making life easier for
yourself by pruning your classes. For example, .blacktext10 and
..blacktext12 have identical rules:
{
font-family : georgia, arial, times new roman;
font-size : 8pt;
font-weight : normal;
}

Even those three simple rules need work:
1. A font-family declaration should end with a generic font, such as
"serif".
2. You've mixed two serif typefaces with one sans-serif.
3. "Font names containing any such characters or whitespace should be
quoted".
4. Points are not a suitable unit of measurement for screen display;
ideally you should use ems, but if you must have fixed sizes then use
pixels.
5. The font-weight should probably be defined for the body instead,
and be allowed to cascade down... assuming that it's even necessary in
the first place.

The simpler your code, the easier it'll be for you to understand, and
the easier it'll be for you to maintain.
--
AGw.

Apr 19 '06 #13
ph**************@gmail.com wrote:
MySpace restricts even the type of tags you are
allowed to use, thus, using valid HTML is not a guarantee simply due to
the content-management-related restrictions imposed by MySpace.


There are 333 HTML errors, which is quite impressive. Are these really
caused by "their" HTML rather than "your" HTML?

Maintaining that code must be an absolute nightmare...!

Regarding your CSS, you should be able to start making life easier for
yourself by pruning your classes. For example, .blacktext10 and
..blacktext12 have identical rules:
{
font-family : georgia, arial, times new roman;
font-size : 8pt;
font-weight : normal;
}

Even those three simple rules need work:
1. A font-family declaration should end with a generic font, such as
"serif".
2. You've mixed two serif typefaces with one sans-serif.
3. "Font names containing any such characters or whitespace should be
quoted".
4. Points are not a suitable unit of measurement for screen display;
ideally you should use ems, but if you must have fixed sizes then use
pixels.
5. The font-weight should probably be defined for the body instead,
and be allowed to cascade down... assuming that it's even necessary in
the first place.

The simpler your code, the easier it'll be for you to understand, and
the easier it'll be for you to maintain.
--
AGw.

Apr 19 '06 #14

ph**************@gmail.com wrote:
http://www.myspace.com/nordicmetalhead

Don't confuse MySpace with web hosting.

MySpace is Barbie's Blog Lite for teenagers who can't even work a
LiveJournal (Barbie's Blog L33t) You just can't expect
halfway-decent presentation control through it.

If you can't do better, stick with MySpace and accept the offered
templated styles. Welcome to Disneyweb.

If you want to work it, get some real web hosting. Don't let MySpace's
marketing fool you into believing that their product is useful,
flexible, "the web" or that real web access suddenly became hard to set
up.

Apr 20 '06 #15

Andy Dingley wrote:
ph**************@gmail.com wrote:
http://www.myspace.com/nordicmetalhead

Don't confuse MySpace with web hosting.

MySpace is Barbie's Blog Lite for teenagers who can't even work a
LiveJournal (Barbie's Blog L33t) You just can't expect
halfway-decent presentation control through it.

If you can't do better, stick with MySpace and accept the offered
templated styles. Welcome to Disneyweb.

If you want to work it, get some real web hosting. Don't let MySpace's
marketing fool you into believing that their product is useful,
flexible, "the web" or that real web access suddenly became hard to set
up.


You want to know the sick irony? I have my own "my space", web hosted,
full control, the works. I can't get the GP to visit it because
"you're not on MySpace, you need to be on MySpace".. I kid you not..

Phil

Apr 20 '06 #16

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by David Ross | last post: by
7 posts views Thread by squidco | last post: by
6 posts views Thread by Daniele Baroncelli | last post: by
9 posts views Thread by kojim | last post: by
3 posts views Thread by moondaddy | last post: by
1 post views Thread by JB | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.