Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

How can I center the menu and the gridview control?

Hi, I'm using asp.net 3.5.  The menu is jQuery Superfish.  It uses the attatched css file.  The logo image from the Masterpage file is centered no problem but the Gridview control in the Content page is not centered correctly.  How can I fix this?  thank you.
Survey-Administration-1315897951
MasterPage.master
Default.aspx
superfish.css
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

If there is a live internet link available, please share the same.
Avatar of lapucca
lapucca

ASKER

I'm doing this on my development pc and it's not ready for deployment.  Are the files that I attached aren't enough?
hi,

you can include the <center></center> tag for the content area you want to center align,

e.g:

<center>
<div style="text-align:center">        
    <asp:GridView ID="gvAccounts" runat="server" AllowPaging="True" ......
.
.
</center>

similarly for the menu...

hope this helps
Actually, i have not worked on ASP, so that is why i was asking, since i wont be able to make your files work. I can help with css though
Avatar of lapucca

ASKER

Hi, I tried the <center> tag but now the gridview control shifts to the right instead of the left and still not centered.  I'm also attaching the html code from Firefox view code and see if that would help.  Thank you.
Survey-Administration-1315902169.jpg
Default.aspx
can you try including the <center> tag in ur master page

like

<center>
<div style="text-align:center">
        <img src="../images/adapt_02.jpg" alt="Adapt"/>    
.
.
.
</center>

undo the changes in default.aspx
This might be the issue

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">        
        </asp:ContentPlaceHolder>
    </div>

Please change this to
 </div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">        
        </asp:ContentPlaceHolder>
   
Avatar of lapucca

ASKER

dex, I tried that and still it's off center, both menu and gridview control

bad, which file is this code that your ref?  The master page or the content page?  Why can't the /div beneath the content placeholder?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of badalpatel
badalpatel

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lapucca

ASKER

Hi bad,
I want the menu to be centered as well.  Would this do it/  If not, how can I modify the sf-menu so it would be centered too?  Thank you.
yes, please see my attached code, i have centered menu and grid in the sample page.
Avatar of lapucca

ASKER

Thank you.  I guess I have to put it in the table in the maser page for it to be centered.