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

  • SEARCH
  • Home
  • 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 6756543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:32:13+00:00 2026-05-26T13:32:13+00:00

In my web site, I’m using Jquery mobile and I need to use a

  • 0

In my web site, I’m using Jquery mobile and I need to use a grid to align buttons in the center of every cell:

|   [BUTTON]   |   [BUTTON]   |   [BUTTON]   |

My code is

<div class="ui-grid-c" align="center">
    <div class="ui-block-a">
       [button code]
    </div>
    <div class="ui-block-b">
       [button code]
    </div>
    <div class="ui-block-c">
       [button code]
    </div>
</div>

But if I use the align attribute in the div I get an HTML5 validation error.

So my question is, how ho I set a style to obtain that graphical result?

  • 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-26T13:32:14+00:00Added an answer on May 26, 2026 at 1:32 pm

    I’m not sure if you want them aligned beside one another or on top of one another (but in the middle), but adding text-align:center; to the ui-grid-c div should apply itself to the divs underneath and will force buttons (<input> or <button>) to be centred because they are inline elements.

    Here’s a JSFiddle example.

    Edit
    Also, if you want them to go across, you’ll want float the inner divs and specify widths for them (33% should be good if you only have three). See my example.

    And here’s the code:

    .ui-grid-c {
        text-align:center; 
    }
    .ui-grid-c > div {
        width:33%;  /*Remove this if you don't want them in a line*/ 
        float:left; /*Remove this if you don't want them in a line*/
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Web Site using ASP.NET MVC 3, Nowadays I need to encrypt
I've have a web site I'm building using NodeJS, that needs to serve up
I currently have a web site hitting 7 Access DBs that I desperately need
I'm developing web site that loads pages dynamically using the .load function. For example:
A web site I've been using has some interesting behavior... There is a form,
We have a web site that uses extensively jQuery and it works fine in
I have a web site with flash forms that I need to scrape .
Our web site( ASP.NET 4.0 ) makes heavy use of meta:ResourceKey in each control
I want my web-site to be SEO-ed and for which I will be using
I am doing a web site using spring mvc framework. I want to do

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.