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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:51:46+00:00 2026-05-29T03:51:46+00:00

Is it possible to have a textbox and a button horizontally using JQuery Mobile?

  • 0

Is it possible to have a textbox and a button horizontally using JQuery Mobile?

using data-inline="true" works for buttons but not when mixed with button and textbox.

data inline example

data-type="horizontal" also didn’t work.

<!DOCTYPE html> 
<html> 
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title></title> 
    <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css"/>
<script type="text/javascript">

   $(document).ready(function(){

           $("#clearMeClearMe").click(function(){
               //$(this).hide();
               $("#clearMe22").val("");
           });
});
</script>
<body> 


<div data-role="page">
    <div data-role="header">
        <h1>Textbox Clear Demo</h1>
    </div><!-- /header -->

    <div id="content">
        <input type="text" id="clearMe22" data-inline="true" name="clearMe22"/>    
            <a href="#" data-role="button" data-icon="delete" 
                      data-iconpos="notext" id="clearMeClearMe">Clear</a>
    </div>
</div><!-- /page -->
</body>
</html>
  • 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-29T03:51:47+00:00Added an answer on May 29, 2026 at 3:51 am

    Seems to work best for me when I float the button right and restrict the width of the text input:

    <span>
                <input style="width:90%;display:inline-block" type="text" id="clearMe22" data-inline="true" name="clearMe22" />    
                <a style="float:right" href="#" class="ui-input-clear" data-role="button" data-icon="delete" 
                          data-iconpos="notext" id="clearMeClearMe">Clear</a>
    </span>
    

    http://jsfiddle.net/xeyyr/1/

    But someone else might be able to provide a more elegant CSS solution.

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

Sidebar

Related Questions

Is it possible to have a multi-line textbox (im using asp.net c#) where the
Is is possible to embedd a TextBox in another TextBox. It does not have
Possible Duplicate: Detect all changes to a <input type=text> (immediately) using JQuery I have
Is it possible to know if any of the textbox values have changed in
Is it possible to have a <div> simultaneously (1) not take up all available
I'm want to make website have a textbox and a save button. When you
I have an asp.net webpage that only contains a textbox and a button. The
Is is possible to have a working Google speech to text button in a
Possible Duplicate: Disable browser's back button I have a log in page <div style=border:1px
Is it possible to capture what button was clicked in javascript? I have validation

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.