Override Link Style for Hyperlinkcolumn class

Discussion in 'ASP .Net' started by SStory, Oct 24, 2003.

  1. SStory

    SStory Guest

    I have a style sheet for my site. It has various classes in it.

    It has <A: styles defined for all anchor tags.

    I have a datagrid in ASP.NET with a stylesheet linked to the page.

    It defines links a yellow which is what I normally won't but in this case I
    want to override the link color and can't seem to do it.

    I set the forecolor in itemstyle prop. But it doesn't work.

    Any ideas?

    Shane
    SStory, Oct 24, 2003
    #1
    1. Advertising

  2. SStory

    SStory Guest

    guess no one knows huh.... This is a real bummer and I don't know how to
    override it.

    "SStory" <> wrote in message
    news:O%...
    > I have a style sheet for my site. It has various classes in it.
    >
    > It has <A: styles defined for all anchor tags.
    >
    > I have a datagrid in ASP.NET with a stylesheet linked to the page.
    >
    > It defines links a yellow which is what I normally won't but in this case

    I
    > want to override the link color and can't seem to do it.
    >
    > I set the forecolor in itemstyle prop. But it doesn't work.
    >
    > Any ideas?
    >
    > Shane
    >
    >
    SStory, Oct 28, 2003
    #2
    1. Advertising

  3. SStory

    SStory Guest

    More info on this problem:
    Have a data grid--for simplicity's sake defined as follows.
    just look at hyperlinkcolumn definition.

    <asp:datagrid id="grid" runat="server" Width="680px"
    CssClass="smallblacktext"
    DataKeyField="jobid" AllowPaging="True" AutoGenerateColumns="False">
    <asp:HyperLinkColumn DataNavigateUrlField="Email"
    DataNavigateUrlFormatString="mailto:{0}" DataTextField="email"
    HeaderText="Rep Email">
    <ItemStyle ForeColor="Blue" Font-Names="Arial" ></ItemStyle>
    </asp:HyperLinkColumn>
    </asp:datagrid>

    as you can see I am trying to override with forecolor="blue" because my grid
    has a white background

    styles.css contains this
    and I want it that way for 80% of my pages; and I have other styles in there
    that I want on all my pages. How can I override this for a HyperLinkColumn?
    A:link {
    text-decoration: none;
    font-size: 8pt;
    color: #ffff00;
    }

    A:visited {
    text-decoration: none;
    font-size: 8pt;
    color: #ffda00;
    }

    A:active {
    text-decoration: none;
    font-size: 8pt;
    color: #FFFF00;
    }

    A:hover {
    text-decoration: underline;
    font-size: 8pt;
    color: #FFFFFF;
    "SStory" <> wrote in message
    news:O%...
    > I have a style sheet for my site. It has various classes in it.
    >
    > It has <A: styles defined for all anchor tags.
    >
    > I have a datagrid in ASP.NET with a stylesheet linked to the page.
    >
    > It defines links a yellow which is what I normally won't but in this case

    I
    > want to override the link color and can't seem to do it.
    >
    > I set the forecolor in itemstyle prop. But it doesn't work.
    >
    > Any ideas?
    >
    > Shane
    >
    >
    SStory, Oct 29, 2003
    #3
  4. SStory

    SStory Guest

    For anyone interested....

    the answer was given in the
    microsoft.public.dotnet.framework.aspnet.datagridcontrols group
    on 11-29-2003 by David

    Thanks anyhow.

    Shane

    "SStory" <> wrote in message
    news:O%...
    > I have a style sheet for my site. It has various classes in it.
    >
    > It has <A: styles defined for all anchor tags.
    >
    > I have a datagrid in ASP.NET with a stylesheet linked to the page.
    >
    > It defines links a yellow which is what I normally won't but in this case

    I
    > want to override the link color and can't seem to do it.
    >
    > I set the forecolor in itemstyle prop. But it doesn't work.
    >
    > Any ideas?
    >
    > Shane
    >
    >
    SStory, Oct 30, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dlo_olb
    Replies:
    2
    Views:
    2,285
    Fredrik Lundh
    Jun 25, 2003
  2. Ken Varn
    Replies:
    0
    Views:
    423
    Ken Varn
    Apr 26, 2004
  3. SStory
    Replies:
    3
    Views:
    164
    SStory
    Oct 30, 2003
  4. Dude

    HyperLinkColumn Link Value at ItemCreated

    Dude, Aug 4, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    106
    Thomas Dodds
    Aug 4, 2004
  5. Jayden
    Replies:
    9
    Views:
    280
    alex23
    Sep 27, 2012
Loading...

Share This Page