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 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 am developing a web site and need to see how it will look
I have a web site using apache httpd as the server and mysql as
A web site I've been using has some interesting behavior... There is a form,
I write a web site with jquery and lot of ajax request to get
My web site stores invoices. I would like to process them every night at
Which web site tracking tools do not have Report Data Sampling? Currently, I'm using
I'm creating a web site and need to ensure it looks the same across
Our web site makes use of showModalDialog . Based on what is done within
I have a .net web site(eg: www.mysite,com) and I use some external links in
My web site has a database lookup; filling out a CAPTCHA gives you 5

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.