JSorrentino
New Member
I'm still new to this all so I'm not sure if this is even asp related but I'm created a couple asp.net pages and placing a div and a datagrid on a page. <BR><BR>How do I center these two elements so they always display in the middle of the loaded page? They are always set literally where I place them on the left side of the page.Datagrids can be positioned with style elements or style sheets. Datagrids generate a table... One idea is to make another table and place the datagrid inside the table where you want it to go.Are you using VisualStudio.NET? I thought of this because of the way you said that the elements are "always set literally where I place them...". Are you dragging a DataGrid from the toolBox and dropping it in the form? VS.NET, by default, is in "grid layout mode", which positions the controls absolutely [where ya drop em]. Switch to "flow layout" mode and set the dataGrid's HorizontalALign Property to "Center".