Grid alignment within table
-
Hi guys, I have a table set to 100% width of the window. And style="text-align:center" Inside the table I have a gridview. When I view the site in IE it displayes the grid in the center of the table, but in firefox it displays the grid in the left of the table. Does anyone know why this happens and how to get it fixed? Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
-
Hi guys, I have a table set to 100% width of the window. And style="text-align:center" Inside the table I have a gridview. When I view the site in IE it displayes the grid in the center of the table, but in firefox it displays the grid in the left of the table. Does anyone know why this happens and how to get it fixed? Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
-
Hi guys, I have a table set to 100% width of the window. And style="text-align:center" Inside the table I have a gridview. When I view the site in IE it displayes the grid in the center of the table, but in firefox it displays the grid in the left of the table. Does anyone know why this happens and how to get it fixed? Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
This happens because there is a bug/feature in IE that makes it apply text alignment to block elements. Text alignment should only be applied to inline elements, that's why Firefox doesn't apply it to the grid. Use margin-left:auto;margin-right:auto; on the grid to center it.
Despite everything, the person most likely to be fooling you next is yourself.
-
Hi guys, I have a table set to 100% width of the window. And style="text-align:center" Inside the table I have a gridview. When I view the site in IE it displayes the grid in the center of the table, but in firefox it displays the grid in the left of the table. Does anyone know why this happens and how to get it fixed? Thanks in advance
No matter how long he who laughs last laughs, he who laughs first has a head start!
have u tried the align attribute for the TD yet? <td align=center> <asp:gridview ..... /> </td>
Ashish Sehajpal
-
This happens because there is a bug/feature in IE that makes it apply text alignment to block elements. Text alignment should only be applied to inline elements, that's why Firefox doesn't apply it to the grid. Use margin-left:auto;margin-right:auto; on the grid to center it.
Despite everything, the person most likely to be fooling you next is yourself.
-
have u tried the align attribute for the TD yet? <td align=center> <asp:gridview ..... /> </td>
Ashish Sehajpal