【发布时间】:2011-04-20 11:18:01
【问题描述】:
我在 Gridview 控件中有一个超链接字段。我正在为 gridview 使用下面显示的样式表。 但是由于某种原因,gridview中的hyperlinkField列不是蓝色的,也没有下划线。
如何将超链接显示为蓝色和下划线的常规超链接?
谢谢
/* table style */
table.BlueGridView
{
font-family:helvetica,arial,sans-serif;
border:solid 1px #7aa5d6;
text-align: left;
font-size: 10pt;
/*position:fixed; */
display:inline-block;
vertical-align: baseline;
direction: ltr;
letter-spacing: normal;
}
/* header cell style */
.BlueGridView th
{
color:#3366cc;
border-right-color:#7aa5d6;
border-bottom-color:#7aa5d6;
background:#e5ecf9;
}
/* cell styles */
.BlueGridView td
{
border-bottom-color:#e5ecf9;
border-right-color:#e5ecf9;
}
/* mouseover row style */
.BlueGridView .row-over
{
background-color:#e5ecf9;
}
/* Alternating Row Color */
.BlueGridView .alt-data-row
{
background-color:#e5ecf9;
font-weight:normal;
font-family:Verdana;
font-size:small;
}
.BlueGridView .data-row
{
font-weight:normal;
font-family:Verdana;
font-size:small;
}
.BlueGridView .selected-row
{
background-color:Blue;
}
/* GridView Header */
.BlueGridView .header-row
{
color: #000080;
font-weight: bold;
text-align:center;
/* position:relative; */
}
/* mouse select row style */
.BlueGridView .row-select
{
background-color:#7aa5d6;
color:#fff;
}
【问题讨论】:
-
你也应该发布你的 GridView 代码,否则真的很难分辨出哪里出了问题。
-
使用 FireBug 确定哪些 CSS 规则最后应用
标签: asp.net gridview asp.net-3.5