Thanks for your help. I followed your advice. It works!
Specifically, I did the following:
.anchor:link {
color:red;
}
.anchor:visited {
color:red;
}
On Jan 21, 2:18 pm, Thomas Broyer <[email protected]> wrote:
> On 21 jan, 22:23, Pion <[email protected]> wrote:
>
>
>
> > I have the following code snippet on GWT 2.0:
>
> > Anchor anchor = new Anchor("Foo", "http://www.foo.com");
> > anchor.addStyleName("anchor");
>
> > Also, I have the following CSS snippet
>
> > /* test 1 */
> > .anchor {
> > color:red;
>
> > }
>
> > The current behavior:
>
> > o The color is red before clicking "Foo". It works as expected.
> > o The color is blue after clicking "Foo". I was expecting it to be
> > still red.
>
> > I tried
>
> > /* test 2 */
> > .anchor a {
> > color:red;
>
> > }
>
> > and
>
> > /* test 3 */
> > .anchor a:link a:visited {
> > color:red;
>
> > }
>
> > Test 1, 2 and 3 change the color after the user click "Foo"..
>
> > How can I keep the color red before and after clicking "Foo"?
>
> > Thanks in advance for your help.
>
> .anchor *is* the <a>, so you'd have to write either of:
>
> .anchor:visited {...}
> a.anchor:visited {...}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.