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 9215681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:15:29+00:00 2026-06-18T02:15:29+00:00

I am working on a website with Jquery Mobile. My title is aligned center

  • 0

I am working on a website with Jquery Mobile. My title is aligned center of the menu as in the image above:

Title of page aligned center with green border

My CSS for the green border is:

.ui-title 
{
    border: 2px solid lime;
}

And the HTML:

<div data-role="header" data-position="fixed" class="menu">
    <a href="#" data-icon="home" data-theme="a">Home</a>
    <h1>Title</h1>
</div>

What I want is the title to span full width (relative to the current width of the window), but still be centered, as the pink lines in following image:

Title of page aligned center with green border and pink lines describing the target width

Any idea how to achieve this without breaking the Jquery Mobile layout (such as device-width for different target devices)?

Solution:

margin-right: 1% !important;
margin-left: 1% !important;

It seems to work in my case (even though the title gets behind the button if the window is small enough).

Update:

No work-around with surrounding div or changing CSS styles, such as margins, solved the issue with header getting too wide on some devices. I guess that’s why the title is so small, to fit all devices properly. I had no time to test this for hours, so I eventually gave up and went back to the default layout, and just made sure the title was narrow enough.

  • 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-06-18T02:15:30+00:00Added an answer on June 18, 2026 at 2:15 am

    Use this css and set your left and right percentage (change 10% to any other number)

    .ui-title {
        margin: 0.6em 10% 0.8em !important;
    }
    

    in case you want different values on different sides use this css:

    .ui-title {
        margin: 0.6em 10% 0.8em 5% !important;
    }
    

    Also if possible give every header an id because mentioned css will change every element using .ui-title class.

    Here’s an example: http://jsfiddle.net/Gajotres/QP9qm/2/

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

Sidebar

Related Questions

I'm working on a mobile-friendly website using jQuery Mobile but would like to do
I'm working on a mobile website with jQuery Mobile. I know the framework puts
I am working on a Mobile website using jquery mobile and would like to
I am working a mobile website, using jQuery Mobile. Safari browser (5.1) not recognzing
I'm using jQuery Mobile on an MVC 3 website. Working well except that I
I developed the mobile website on Jquery Mobile and C#. It is working but
I’m working on a mobile website using jQuery Mobile and knockout.js. I have a
im currently working on a website for mobile devices and im using jquery mobile.
So I'm working on a website that uses both jQuery and prototype.js, however their
I am working on some website , i have used jQuery UI , for

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.