Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4073124
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:58:31+00:00 2026-05-20T16:58:31+00:00

<div class=center> <table id=results></table> </div> <script type=text/javascript> $(document).ready(function () { $(#results).jqGrid({ datatype: local, height:

  • 0
<div class="center">
    <table id="results"></table>
</div>

<script type="text/javascript">
        $(document).ready(function () {
            $("#results").jqGrid({
                datatype: "local",
                height: 250,
                colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
                colModel: [
                            { name: 'id', index: 'id', width: 60, sorttype: "int" },
                            { name: 'invdate', index: 'invdate', width: 90, sorttype: "date" },
                            { name: 'name', index: 'name', width: 100 },
                            { name: 'amount', index: 'amount', width: 80, align: "right", sorttype: "float" },
                            { name: 'tax', index: 'tax', width: 80, align: "right", sorttype: "float" },
                            { name: 'total', index: 'total', width: 80, align: "right", sorttype: "float" },
                            { name: 'note', index: 'note', width: 150, sortable: false }
                        ],
                multiselect: true,
                caption: "Manipulating Array Data"
            });
            var mydata = [
                            { id: "1", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
                            { id: "2", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
                            { id: "3", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" },
                            { id: "4", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
                            { id: "5", invdate: "2007-10-05", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
                            { id: "6", invdate: "2007-09-06", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" },
                            { id: "7", invdate: "2007-10-04", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" },
                            { id: "8", invdate: "2007-10-03", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" },
                            { id: "9", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" }
                            ];
            for (var i = 0; i <= mydata.length; i++)
                $("#results").jqGrid('addRowData', i + 1, mydata[i]);
        });
    </script>

However the grid doesn’t not appear centered where as everything else that uses that class is centered.

How can I center the grid? The CSS looks like this:

div.header
{
    text-align: center;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:58:31+00:00Added an answer on May 20, 2026 at 4:58 pm

    Add the following to your CSS:

    .center
    {
    width: 640px;
    margin-left: auto;
    margin-right: auto;
    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<asp:Repeater ID=repFilter runat=server> <HeaderTemplate> <div id=posting align=center> </HeaderTemplate> <ItemTemplate> <div class=friends_area id=record-> <%# ((Alert)Container.DataItem).Message
Given: <div class=subHead>Stock Options</div> <table class=settingTable> <tr> <td colspan=2><b>Limited Stock</b></td> </tr> <tr> <td width=50
How can I get an image to stretch the height of a DIV class?
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
I have a list of dynamically generated div-tags with a class-attribute but no id.
From the haskell report: The quot, rem, div, and mod class methods satisfy these
I am trying to insert rows into an html table with javascript. I have
The CSS syntax highlighting in vim is not entirely optimal. For example: div.special_class stops
div#thing { position: absolute; top: 0px; z-index: 2; margin: 0 auto; } <div id=thing>
Header div on top of the 3 columns Height of all columns must fill

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.