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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:27:41+00:00 2026-06-12T10:27:41+00:00

I am trying to put on the same line $(‘.prize-item input’) and $(‘.prize-edit’) Here

  • 0

I am trying to put on the same line $('.prize-item input') and $('.prize-edit')

Here is the DOM structure (1) and the CSS code (2).

I tried to sue the display:inline-block with no success.

The prerequisite is the following:
1) You must not use position absolute.
2) Resizing the screen, the distance between the button and the input box should not change.
3) The DOM structure should be changed only if it is not possible to obtain the result I requested with CSS.

Demo: http://jsfiddle.net/jBme9/8/


(1)

<div class="control-group">
    <div class="controls">
        <div class="prize-edit">
            <button type="button" class="btn" data-toggle="collapse" data-target="">Edit Same line</button>
        </div>
        <div class="prize-item">
            <div class="control-group ">
                <label class="control-label">Name</label>
                <div class="controls">
                    <input type="text" class="form-prize-item-name" value="prize same line">
                </div>
            </div>
        </div>

    </div> 
</div>

​

(2)

.prize-edit {
    float: right;
    display: inline-block;
}

.prize-item input {
    float: left;
    display: inline-block;
}
  • 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-12T10:27:43+00:00Added an answer on June 12, 2026 at 10:27 am

    You can use relative positioning. Please adjust these values for your real page.

    Demo

    Code:

    .controls button {
        float: right;
        position:relative;
        top:38px;
        right:17px;
    }
    

    I used pixels ’cause you’re using pixels, but this can be done with ems too.


    To push the button outside the input, add another class to the input’s wrapper. Let’s call it “controlsWrapper”.

    So that you’ll have in html:

    <div class="controls controlsWrapper"><input...other stuff...></div>
    

    And in CSS

    .controls button {
        float: right;
        position:relative;
        top:38px;
    }
    .controlsWrapper {
        box-sizing: border-box;
        width:100%;
        padding-right:40px; /* width of the button + some space */
    }
    

    Check the demo

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

Sidebar

Related Questions

I'm trying to put the divs div.mes and div.vazio on same line. If I
I'm trying to put the rows of one matrix in the same order as
I'm trying to place normal size text on the same line as a header
I'm trying to display two <div> elements on the same line, but in the
I've been trying to put on-line a test page and everything works as supposed
It's pretty simple what I'm trying to accomplish here. Say you put down 320
I am trying to add a search input and three buttons on the same
I am trying to put an autocomplete input on my website and I have
I'm trying put an if statement directly into a select field in rails, with
Trying to put a regex expression together that returns the string between _ and

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.