473,386 Members | 1,795 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,386 software developers and data experts.

CSS Font-size in DataGrid

I am having trouble with links in my DataGrid.

I have Links all over my page set to smaller and they are consistant all
over the page in both Mozilla and IE, except for the DataGrid.

Here is a snippet from my .css file:
***************************
body {
margin:0;
padding:0;
}
th {
background-color:#2FABAD;
color:white;
}
td {
font-size:smaller;
}
a {
font-size:smaller;
}
********************************************

I only have the font-size set in my "td" and "a" rules.

This makes everything work in both IE and Mozilla outside of the Datagrid
and the links are the same size in the Datagrid for Mozilla.

In IE, however the links always seem to be smaller than all the other links.
The text, however, is always the same size in both IE and Mozilla.

If I remove the "td" or "a", all the links get larger (as I would expect),
but in IE the links in the DataGrid is still smaller than the other links on
the page.

It is almost as if the Page is setting the links to smaller and the DataGrid
is setting smaller to the smaller size (doubling the smaller in essence) -
But only in IE.

What is causing this and how do I get around it?

Thanks,

Tom
Nov 18 '05 #1
4 3467
Tom, I played around a bit and couldn't duplicate your problem, but I do know
that relative sizes (e.g. "smaller" vs. "small") are always relative to the
parent element, not to some absolute, so I think a smaller <a> within a
smaller <td> is going to be "twice" as small (although I couldn't get this to
happen in IE6, which doesn't say much for the theory). Do you have the same
problem if you go with absolute sizes (e.g. 12px, small, etc.)?

Bill

"tshad" wrote:
I am having trouble with links in my DataGrid.

I have Links all over my page set to smaller and they are consistant all
over the page in both Mozilla and IE, except for the DataGrid.

Here is a snippet from my .css file:
***************************
body {
margin:0;
padding:0;
}
th {
background-color:#2FABAD;
color:white;
}
td {
font-size:smaller;
}
a {
font-size:smaller;
}
********************************************

I only have the font-size set in my "td" and "a" rules.

This makes everything work in both IE and Mozilla outside of the Datagrid
and the links are the same size in the Datagrid for Mozilla.

In IE, however the links always seem to be smaller than all the other links.
The text, however, is always the same size in both IE and Mozilla.

If I remove the "td" or "a", all the links get larger (as I would expect),
but in IE the links in the DataGrid is still smaller than the other links on
the page.

It is almost as if the Page is setting the links to smaller and the DataGrid
is setting smaller to the smaller size (doubling the smaller in essence) -
But only in IE.

What is causing this and how do I get around it?

Thanks,

Tom

Nov 18 '05 #2
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Tom, I played around a bit and couldn't duplicate your problem, but I do
know
that relative sizes (e.g. "smaller" vs. "small") are always relative to
the
parent element, not to some absolute, so I think a smaller <a> within a
smaller <td> is going to be "twice" as small (although I couldn't get this
to
happen in IE6, which doesn't say much for the theory). Do you have the
same
problem if you go with absolute sizes (e.g. 12px, small, etc.)?
I'll have to play with it some more and get a small example to see if I can
recreate it and post it. I don't know about fixed sizes.

I know I am using IE6 and that is where it is happening

But I know I have other links on my screen (and they are all in TD's in some
form or another) that don't change and match Mozilla's size. Only inside of
my DataGrid are they a problem and only on IE.

Thanks,

Tom
Bill

"tshad" wrote:
I am having trouble with links in my DataGrid.

I have Links all over my page set to smaller and they are consistant all
over the page in both Mozilla and IE, except for the DataGrid.

Here is a snippet from my .css file:
***************************
body {
margin:0;
padding:0;
}
th {
background-color:#2FABAD;
color:white;
}
td {
font-size:smaller;
}
a {
font-size:smaller;
}
********************************************

I only have the font-size set in my "td" and "a" rules.

This makes everything work in both IE and Mozilla outside of the Datagrid
and the links are the same size in the Datagrid for Mozilla.

In IE, however the links always seem to be smaller than all the other
links.
The text, however, is always the same size in both IE and Mozilla.

If I remove the "td" or "a", all the links get larger (as I would
expect),
but in IE the links in the DataGrid is still smaller than the other links
on
the page.

It is almost as if the Page is setting the links to smaller and the
DataGrid
is setting smaller to the smaller size (doubling the smaller in
essence) -
But only in IE.

What is causing this and how do I get around it?

Thanks,

Tom

Nov 18 '05 #3
To style elements within a data grid, you can specifically add rules
using the following kind of syntax.
.DataSetClassName a{
//specific style for links in the datagrid
}
.DataSetClassName a:hover{
//specific style for hovered links in the dataset
}

Nov 18 '05 #4
Ok. Here is the scenario. I found out what has been happening, but not
why.

Apparently, if you have a Datagrid with no "Font-size=smaller", IE and
Mozilla act the same (whether or not you have a style a {smaller}.

If you now add "Font-size=smaller", IE will get smaller but Mozilla will
ignore it. Mozilla doesn't ignore the other font styles, such as
"Font-name" - only "Font-Size".

Then if you have a style a {smaller} and "font-size=smaller" it is additive.
It will take the smaller from the "style a" and than will make it even
smaller from the "font-size" in the DataGrid.

This does not happen in Mozilla since it ignores the "font-size in the
DataGrid"

Which is correct?

Here are 3 files that show the behavior

1st: no font-smaller or style a{smaller}
************************************************** ******************************************
<%@ Page Language="VB" Debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
Function CreateDataSource() As ICollection

Dim dt As DataTable
Dim dr As DataRow
Dim i As Integer

'create a DataTable
dt = New DataTable()
dt.Columns.Add(New DataColumn("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn("BoolValue", GetType(Boolean)))
dt.Columns.Add(New DataColumn("CurrencyValue", GetType(Double)))

'Make some rows and put some sample data in
For i = 1 To 5
dr = dt.NewRow()
dr(0) = "Item " + i.ToString()
If (i Mod 2 <> 0) Then
dr(1) = True
Else
dr(1) = False
End If
dr(2) = 1.23 * (i + 1)
'add the row to the datatable
dt.Rows.Add(dr)
Next

'return a DataView to the DataTable
CreateDataSource = New DataView(dt)

End Function

Sub Page_Load(sender as Object, e as EventArgs)

if not IsPostBack then
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
end if
End Sub

Private Sub DataGrid4_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid4_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in editCommand")
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_CancelCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in cancelCommand")
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>View Positions</title>
<style type="text/css">
body {
margin:0;
padding:0;
}
</style>
</head>
<body>
<form method="post" name="form1" class="BodyText" runat="server">
<div align="left"><a href="addPositions.aspx">Add New Positions</a></div>
<p>
<asp:DataGrid id="DataGrid4" runat="server" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="4"
onItemDataBound="DataGrid4_ItemDataBound"
onEditCommand="DataGrid4_EditCommand"
onUpdateCommand="DataGrid4_UpdateCommand"
onCancelCommand="DataGrid4_CancelCommand">
<HeaderStyle HorizontalAlign="center" BackColor="#c0edee"
ForeColor="#2FABAD" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true"/>
<ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica,
sans-serif"/>
<AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana, Arial,
Helvetica, sans-serif" />
<FooterStyle HorizontalAlign="center" BackColor="#E8EBFD"
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true"/>
<PagerStyle BackColor="white" Font-Name="Verdana, Arial, Helvetica,
sans-serif" />
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update"
CancelText="Cancel"
EditText="Edit">
</asp:EditCommandColumn>
</Columns>

<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC">
</PagerStyle>
</asp:DataGrid><br>
</form>
</body>
</html>
************************************************** ***************************
Both IE and Mozilla are identical

2nd: adding the font-size=smaller to the DataGrid
************************************************** *****************************
<%@ Page Language="VB" Debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
Function CreateDataSource() As ICollection

Dim dt As DataTable
Dim dr As DataRow
Dim i As Integer

'create a DataTable
dt = New DataTable()
dt.Columns.Add(New DataColumn("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn("BoolValue", GetType(Boolean)))
dt.Columns.Add(New DataColumn("CurrencyValue", GetType(Double)))

'Make some rows and put some sample data in
For i = 1 To 5
dr = dt.NewRow()
dr(0) = "Item " + i.ToString()
If (i Mod 2 <> 0) Then
dr(1) = True
Else
dr(1) = False
End If
dr(2) = 1.23 * (i + 1)
'add the row to the datatable
dt.Rows.Add(dr)
Next

'return a DataView to the DataTable
CreateDataSource = New DataView(dt)

End Function

Sub Page_Load(sender as Object, e as EventArgs)

if not IsPostBack then
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
end if
End Sub

Private Sub DataGrid4_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid4_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in editCommand")
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_CancelCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in cancelCommand")
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>View Positions</title>
<style type="text/css">
body {
margin:0;
padding:0;
}
</style>
</head>
<body>
<form method="post" name="form1" class="BodyText" runat="server">
<div align="left"><a href="addPositions.aspx">Add New Positions</a></div>
<p>
<asp:DataGrid id="DataGrid4" runat="server" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="4"
onItemDataBound="DataGrid4_ItemDataBound"
onEditCommand="DataGrid4_EditCommand"
onUpdateCommand="DataGrid4_UpdateCommand"
onCancelCommand="DataGrid4_CancelCommand">
<HeaderStyle HorizontalAlign="center" BackColor="#c0edee"
ForeColor="#2FABAD" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="Smaller"/>
<ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica,
sans-serif" Font-Size="Smaller"/>
<AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana, Arial,
Helvetica, sans-serif" Font-Size="Smaller"/>
<FooterStyle HorizontalAlign="center" BackColor="#E8EBFD"
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="Smaller"/>
<PagerStyle BackColor="white" Font-Name="Verdana, Arial, Helvetica,
sans-serif" />
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update"
CancelText="Cancel"
EditText="Edit">
</asp:EditCommandColumn>
</Columns>

<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC">
</PagerStyle>
</asp:DataGrid><br>
</form>
</body>
</html>
************************************************** ********************************

Both Mozilla and IE should look the same, but smaller.

3rd: adding the style a {smaller}
************************************************** *********************************
<%@ Page Language="VB" Debug="true" ContentType="text/html"
ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script runat="server">
Function CreateDataSource() As ICollection

Dim dt As DataTable
Dim dr As DataRow
Dim i As Integer

'create a DataTable
dt = New DataTable()
dt.Columns.Add(New DataColumn("StringValue", GetType(String)))
dt.Columns.Add(New DataColumn("BoolValue", GetType(Boolean)))
dt.Columns.Add(New DataColumn("CurrencyValue", GetType(Double)))

'Make some rows and put some sample data in
For i = 1 To 5
dr = dt.NewRow()
dr(0) = "Item " + i.ToString()
If (i Mod 2 <> 0) Then
dr(1) = True
Else
dr(1) = False
End If
dr(2) = 1.23 * (i + 1)
'add the row to the datatable
dt.Rows.Add(dr)
Next

'return a DataView to the DataTable
CreateDataSource = New DataView(dt)

End Function

Sub Page_Load(sender as Object, e as EventArgs)

if not IsPostBack then
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
end if
End Sub

Private Sub DataGrid4_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)

trace.warn("in itemdatabound")
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem
Dim editButton As LinkButton = New LinkButton()
editButton = CType(e.Item.Cells(0).Controls(0), LinkButton)
editButton.Attributes.Add("name", "#" & editButton.UniqueID)

Case ListItemType.EditItem
Dim UpdateButton As LinkButton = New LinkButton()
UpdateButton = CType(e.Item.Cells(0).Controls(0),
LinkButton)
UpdateButton.Attributes.Add("name", "#" &
UpdateButton.UniqueID)
End Select
End Sub

Private Sub DataGrid4_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in editCommand")
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_CancelCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
trace.warn("in cancelCommand")
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub

Private Sub DataGrid4_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs )
DataGrid4.EditItemIndex = -1
DataGrid4.DataSource = CreateDataSource()
DataGrid4.DataBind()
End Sub
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>View Positions</title>
<style type="text/css">
body {
margin:0;
padding:0;
}
a {
font-size:smaller;
}
</style>
</head>
<body>
<form method="post" name="form1" class="BodyText" runat="server">
<div align="left"><a href="addPositions.aspx">Add New Positions</a></div>
<p>
<asp:DataGrid id="DataGrid4" runat="server" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="4"
onItemDataBound="DataGrid4_ItemDataBound"
onEditCommand="DataGrid4_EditCommand"
onUpdateCommand="DataGrid4_UpdateCommand"
onCancelCommand="DataGrid4_CancelCommand">
<HeaderStyle HorizontalAlign="center" BackColor="#c0edee"
ForeColor="#2FABAD" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="Smaller"/>
<ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica,
sans-serif" Font-Size="Smaller"/>
<AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana, Arial,
Helvetica, sans-serif" Font-Size="Smaller"/>
<FooterStyle HorizontalAlign="center" BackColor="#E8EBFD"
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="Smaller"/>
<PagerStyle BackColor="white" Font-Name="Verdana, Arial, Helvetica,
sans-serif" />
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update"
CancelText="Cancel"
EditText="Edit">
</asp:EditCommandColumn>
</Columns>

<PagerStyle HorizontalAlign="Center" ForeColor="#330099"
BackColor="#FFFFCC">
</PagerStyle>
</asp:DataGrid><br>
</form>
</body>
</html>
************************************************** ****************************

Here both IE and Mozilla get smaller (IE is smaller the Mozilla, because of
the previous setting of the font-size in the DataGrid)

Very confusing and time wasting.

The solutions seems to be to NEVER use font-size in the DataGrid if you
don't know what browser you are going to use. What I was finding that in IE
I was not able to see the link at all, it was so small.

BTW, Netscape works the same way as Mozilla.

Thanks,

Tom.
"tshad" <ts**********@ftsolutions.com> wrote in message
news:OR**************@TK2MSFTNGP14.phx.gbl...
"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Tom, I played around a bit and couldn't duplicate your problem, but I do
know
that relative sizes (e.g. "smaller" vs. "small") are always relative to
the
parent element, not to some absolute, so I think a smaller <a> within a
smaller <td> is going to be "twice" as small (although I couldn't get
this to
happen in IE6, which doesn't say much for the theory). Do you have the
same
problem if you go with absolute sizes (e.g. 12px, small, etc.)?


I'll have to play with it some more and get a small example to see if I
can recreate it and post it. I don't know about fixed sizes.

I know I am using IE6 and that is where it is happening

But I know I have other links on my screen (and they are all in TD's in
some form or another) that don't change and match Mozilla's size. Only
inside of my DataGrid are they a problem and only on IE.

Thanks,

Tom

Bill

"tshad" wrote:
I am having trouble with links in my DataGrid.

I have Links all over my page set to smaller and they are consistant all
over the page in both Mozilla and IE, except for the DataGrid.

Here is a snippet from my .css file:
***************************
body {
margin:0;
padding:0;
}
th {
background-color:#2FABAD;
color:white;
}
td {
font-size:smaller;
}
a {
font-size:smaller;
}
********************************************

I only have the font-size set in my "td" and "a" rules.

This makes everything work in both IE and Mozilla outside of the
Datagrid
and the links are the same size in the Datagrid for Mozilla.

In IE, however the links always seem to be smaller than all the other
links.
The text, however, is always the same size in both IE and Mozilla.

If I remove the "td" or "a", all the links get larger (as I would
expect),
but in IE the links in the DataGrid is still smaller than the other
links on
the page.

It is almost as if the Page is setting the links to smaller and the
DataGrid
is setting smaller to the smaller size (doubling the smaller in
essence) -
But only in IE.

What is causing this and how do I get around it?

Thanks,

Tom


Nov 18 '05 #5

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

Similar topics

1
by: Justin Van Patten | last post by:
Hello, I am having trouble converting a LOGFONT structure to a System.Drawing.Font object. I'm calling SystemParametersInfo to get the LOGFONT lfntSMCaptionFont from a NONCLIENTMETRICS...
10
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out...
3
by: Barry Anderberg | last post by:
I'm using the .NET Memory Profiler by Sci Tech and I wrote a little test application to verify something odd I observed and it appears that System.Drawing.Font fails to dispose of its FontFamily. ...
3
by: Wim | last post by:
I would like to store the ListView font in the XML config file. So I have a string variable listFont that stores the font (font.ToString()). It must be a string variable because a Font object...
3
by: pnp | last post by:
I have created a coposite user control of a text box and a label. I have exposed the font of the textbox property through a property of the control but every time I try to change that through the...
4
by: BobAchgill | last post by:
Is it possible to use a font that is not stored in the windows font directory? I would like to use a font that is stored in my application directory... But this does not seem to work... ...
6
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a...
1
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, ...
24
by: Tony Girgenti | last post by:
Hello. Developing a Windows Form program in VS.NET VB, .NET Framework 1.1.4322 on a windows XP Pro, SP2. Before printing a document, i want to set the font to a font that is only available...
16
by: carlbernardi | last post by:
Hi, I was wondering if there is way use a font that is somehow kept in the code instead of having to load it? I am working on a single script that so far can produce images and html but I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.