> if i use
>
> <div style="margin-left: auto;margin-right: auto;text-align: center;">
> gridview is here</div>
>
> the grid view within the div is centered alright,
That is only because you are looking at it in Internet Explorer, which
applies text-align to block elements although it shouldn't. If you look
at it in a more standards compliant browser, the grid isn't centered.
You applied the margin to the div, not to the item as I said. However,
as the div doesn't have a specific size, the margin will still be zero.
If you want to center a block, it has to have a specific width.
> but all the Text in the
> columns is also centered, which i need left-aligned (by default)
That's because you tried to use both methods. An element can't be both a
block element and an inline element.
>>> How do i center-align a items within a <div></div> tag
>> If the item is a block element, on the item use:
[quoted text clipped - 5 lines]
>>
>> text-align: center;

Signature
Göran Andersson
_____
http://www.guffa.com