Do MSFT programmers hate Mozilla Firefox users? (Border problem).

B

Brian Binnerup

Hi there.

I ran into something funny (well sort of, it's not funny when trying to make
a web application for more than one browser) ;-)

When using the datagrid control I set the cellspacing, cellpadding and
border to 0 in the asp:DataGrid tag, which also renders in the browser in
Internet Explorer. But somehow I found that Firefox still makes a border.

I wondered a bit why until I saw in the code that the table has multiple
border elements - the one I wrote with border=0, and one that the datagrid
renders itself - border=1.

Internet Explorer somehow uses the first attribute, while Firefox uses the
second - and I can't seem to find a way to remove the second one. I have
border: 0px; in the stylesheet also - still I get a 1px black border in
Firefox.

What can a man do? (Don't tell me to throw out Firefox, since this is a
ASP.NET problem IMO).

Regards,

Brian
 
A

Alvin Bruney [MVP]

the problem is due to something loosely called adaptive rendering.
basically, different forms of the html specification are written to non-IE
browsers which may cause reduced functionality. There is a trick to adding a
configuration setting to fix this. have a google for it because the fix is
quite lengthy
 
B

Brian Binnerup

basically, different forms of the html specification are written to non-IE
browsers which may cause reduced functionality.

I will see if I can google anything here, but actually looking at the code
there is two border attributes on both IE and Firefox - the reason for my
problem is that Firefox trigger on the second one, while IE trigger on the
first one.

The rendered html is the same. (Atleast with the two border attributes).

Regards,

Brian
 
N

Neven Zovko

Hi Brian,

setting the GridLines property to None should solve the problem.
The default value of GridLines is Both, and this is the reason
why Firefox shows the borders (IE seems to ignore the GridLines
property).
 
B

Brian Binnerup

The default value of GridLines is Both, and this is the reason
why Firefox shows the borders (IE seems to ignore the GridLines
property).

This works!

Great - thanks a lot!

Regards,

Brian
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top