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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:04:49+00:00 2026-05-30T17:04:49+00:00

Please note: I am new to CS. Brand new. I want my button div

  • 0

Please note: I am new to CS. Brand new.

I want my button div to be placed horizontally inside the confirm div: example.

Right now my dialog-button div width is equal to the width of the confirm Div. Why?

I am just placing two buttons inside my Div, so it’s width should be equal to 128 (the total of two button witdh). Similarly the height should be equal to button height, but it isn’t.

Second i want that mt button-div placed center horizontally . I tried left: 50% inside my button-div. But it is aligning the left margin with the centre of the confirm div. How can i do it?

EDIT
————————————————–

enter image description here

  • 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-30T17:04:51+00:00Added an answer on May 30, 2026 at 5:04 pm

    May be I didn’t understand correctly, but if you want it inside then put it inside.

    <div id="message">
    
        Are you sure you want to  
    
        <div id="dialog-button">
            <button>Ok</button>
            <button>Cancel</button>
        </div>             
    </div>
    

    Demo


    Update 1

    Right now my dialog-button div width is equal to the width of the confirm Div. Why?

    Why, because <div>s are block tag, they always take 100% width of the containing element. It is not equal to the width of confirm Div.

    To make the dialog-button take the actual width use display: inline-block as its CSS. Demo

    Update 2:

    To the best from what i understood. This is what you want. If not help me help you.

    Update 3:

    Ok, here is a demo with the image. I will leave the without image part to you. 😉

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

Sidebar

Related Questions

Please note i am new to LINQ to XML. I am now trying to
Please note that this question is from 2008 and now is of only historic
In a brand new ASP.NET MVC2 project, I want the user to be redirected
Please note: I am asking the question I want answered. I know this question
Please note this is just an example: <img src=img/normal-font.png onclick=javascript:document.body.style.fontSize = '13px'; /> &nbsp;
Please note I'm totally new to ASP.NET.. How can I have the username, password
I'm pretty new to c#. Can somebody please give me the right direction on
Please note: I am new to TDD & cucumber, so the answer may be
Please note - I am not looking for the right way to open/read a
Please note that I am not talking about Generic Type parameters. For example in

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.