473,414 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Override Link Style for Hyperlinkcolumn class

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
Nov 17 '05 #1
3 3364
guess no one knows huh.... This is a real bummer and I don't know how to
override it.

"SStory" <Th*******@TAKETHISSPAMBUSTEROUT.Softhome.net> wrote in message
news:O%****************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
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" <Th*******@TAKETHISSPAMBUSTEROUT.Softhome.net> wrote in message
news:O%****************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #3
For anyone interested....

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

Thanks anyhow.

Shane

"SStory" <Th*******@TAKETHISSPAMBUSTEROUT.Softhome.net> wrote in message
news:O%****************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris Kouwenhoven | last post by:
Hello, I'm using an external css-file which contains BODY elements. In one certain page i want to overrule the background-color properties, but the functions as getElementByTags of byId does not...
11
by: brett | last post by:
If I want all text, no matter where it is, to be gray, is there a way to override styles and have that color take affect? It would need to override DIVs, tables, SPANs, anywhere inline styles are...
2
by: Al Franz | last post by:
Have a web site which uses a CSS file. There is one link which I would like to change the colors for the A:link, A:visited, and A:hover. Is there something I can put in the HTML code to override...
3
by: Woodmon | last post by:
Example of my CSS follows: <style type="text/css" media="screen"> BODY { color: white } A:link { color: 66CCFF; } A:visited { color: CC66FF; } A:active { color: CC66FF; } A:hover {...
2
by: Mark Essex | last post by:
I am trying to build an interface that requires the developer to use the OVERRIDE option. I looked at abstract classes, but seemed to have a couple of problems: 1. If you do this in a form, it...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
2
by: Luis E Valencia | last post by:
I want a row of the datagrid with a personalized link. The fields of the link are on the select related to the datagrid the link would be accoiones.aspx?iddireccion=2&idindicador=5 I tried...
3
by: Maziar Aflatoun | last post by:
Hi everyone, Does anyone know how I can apply the css 'linksmall' to my hyperlink in my datagrid? I have the following and it doesn't work <asp:HyperLinkColumn Text="Edit"...
0
by: Terrance | last post by:
I'm working with ASP.NET 2.0 and I'm trying to figure out; how can I prevent the link that I have in a datagrid from showing up as a visited link? This is the code I have in the datagrid for the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.