So I'ma coding the new Blonde Foundation, and apparently, it decides not to recognise the first pseudo-class under a > selector...
That is,
div#subnav > a:first-child:link, a:first-child:visited
{
color: #d08257;
text-decoration: none;
}
Doesn't apply the style to
a:first-child:link. If I write it twice, it does, to the second one. Like so.
div#subnav > a:first-child:link, a:first-child:link, a:first-child:visited
{
color: #d08257;
text-decoration: none;
}
Any pseudo classes I put under it do this, I haven't tried normal classes. Does anyone know why? Is it a Mozilla bug? A CSS bug?
EDIT- Tested in IE. Looks like a CSS bug?
None.
So I'ma coding the new Blonde Foundation, and apparently, it decides not to recognise the first pseudo-class under a > selector...
That is,
div#subnav > a:first-child:link, a:first-child:visited
{
color: #d08257;
text-decoration: none;
}
Doesn't apply the style to
a:first-child:link. If I write it twice, it does, to the second one. Like so.
div#subnav > a:first-child:link, a:first-child:link, a:first-child:visited
{
color: #d08257;
text-decoration: none;
}
Any pseudo classes I put under it do this, I haven't tried normal classes. Does anyone know why? Is it a Mozilla bug? A CSS bug?
EDIT- Tested in IE. Looks like a CSS bug?
CSS is Standardized.. IE is not..
Its not the CSS cause its been standardized by the W3C so I am blaming IE on this one cause they're not standardized.
None.
I don't see anything wrong.
Test file: [attach=2588]
I believe you are making a syntax error for you to think it's a bug, as you are writing two very different declarations. You probably want this:
div#subnav > a:first-child:link, div#subnav > a:first-child:visited { }
in which case, you will either get your colors or you won't, depending on if your <a> element is truly the first element under the subnav div.
It's probably not though, because your other declarations are working which are an <a> element being the first element of any element.
HTML example?
Oh, and it won't work in IE, at least up until IE 7. I tried getting away using various css2 stuffs on sen before I finally gave up on IE complaints.
Edit: And as far as possible solutions:
If your <a> is is a consistent dom, just transverse it as needed. As if there was a <br /> between the subnav and <a>: div#subnav > br:first-child + a:link or if a is inside another element, div#subnav > *:first-child: > a:first-child:link.
Or if possible, make the link in an empty span/div with it's own name and start from there. <div subnav>blah blah blah <div links><a><a><a></div></div> and switch your subnav css to the new links class.
Also, I hope you realize there will only be one <a> element that would apply to the class you wrote, ever.
Attachments:
Post has been edited 1 time(s), last time on Jan 16 2009, 7:38 pm by isolatedpurity.
None.
Quote from name:isolatedpurity
I don't see anything wrong.
Test file: [attach=2588]
I believe you are making a syntax error for you to think it's a bug, as you are writing two very different declarations. You probably want this:
div#subnav > a:first-child:link, div#subnav > a:first-child:visited { }
in which case, you will either get your colors or you won't, depending on if your <a> element is truly the first element under the subnav div.
It's probably not though, because your other declarations are working which are an <a> element being the first element of any element.
HTML example?
Oh, and it won't work in IE, at least up until IE 7. I tried getting away using various css2 stuffs on sen before I finally gave up on IE complaints.
Edit: And as far as possible solutions:
If your <a> is is a consistent dom, just transverse it as needed. As if there was a <br /> between the subnav and <a>: div#subnav > br:first-child + a:link or if a is inside another element, div#subnav > *:first-child: > a:first-child:link.
Or if possible, make the link in an empty span/div with it's own name and start from there. <div subnav>blah blah blah <div links><a><a><a></div></div> and switch your subnav css to the new links class.
Also, I hope you realize there will only be one <a> element that would apply to the class you wrote, ever.
Lol, the anchor tag just has different parameters (or do they call them attributes in HTML?) to it, lol.
Attachments:
None.
Kellimus, if you'd bothered to read, you'd see I'd tested it in Firefox before IE. Also, the w3 CSS validator passes it.
IP, what you typed works exactly the same as the syntax I had... Although I cut it down, because I didn't really need the first-child pseudo. (Mainly, it's not a first-child any more.) now it's
#subnav > a:link, a:link, a:visited
{
color: #a37347;
text-decoration: none;
}
#subnav > a:hover, a:hover, a:active
{
color: #d08257;
text-decoration: underline;
}
And this works perfectly, but the a:hover and a:link stop getting styled unless I have something before them. This is what is confusing me. It doesn't need to be repeated, it just needs any class before it. p, make it work, for example.
EDIT - For the record
#subnav > a:link, #subnav > a:visited
{
color: #a37347;
text-decoration: none;
}
#subnav > a:hover, #subnav > a:active
{
color: #d08257;
text-decoration: underline;
}
doesn't work.
Post has been edited 1 time(s), last time on Jan 17 2009, 12:54 am by Syphon.
None.
The HTML it's on is
<div id='subnav'>
<span id='left'>
//Title// <span style='font-weight: normal'>by</span> <a href='//authorprofile//'>//Author//</a>
</span>
<span id='right'>
First | Last | Random | Next | Newest
</span>
</div>
None.
I'm retarded.
#subnav a:link, #subnav a:visited
{
color: #a37347;
text-decoration: none;
}
#subnav a:hover, #subnav a:active
{
color: #d08257;
text-decoration: underline;
}
Done.
None.
I think you want:
#subnav a:link, #subnav a:visited { colors; }
None.
Fuck you beat me to it while I was testing it to make sure ;o
None.
Fuck you beat me to the ninja'd gloating!
So the moral of the story is, it was disregarding the first part, because it didn't mean anything, and I am horrible at CSS syntax
None.