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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:47:46+00:00 2026-05-26T04:47:46+00:00

i need to align elements in two different div elements . my css div.details-box

  • 0

i need to align elements in two different div elements .

my css

    div.details-box {      
        display:inline-block;
        *display:inline;
        width:850px;    
        margin-right:100px;
        margin-left:200px;
        margin-top:50px;
        border:1px solid #000;
        background:#eee;
        border-radius:5px;
        -moz-border-radius:5px; 
       direction:rtl;      
   }
   div.details-box div.row
   {
      display:block;    
      width:850px;
      margin:auto;
      margin-bottom:8px;            
      border:2px solid red;
      padding-right:150px;
   }
   div.details-box div.row div.inline-wraper
   {
      display:inline-block;   
      width:250px;
      border:1px solid blue;    
   }

my html:

<div class="details-box">
   <div class="row"> 
       <div class="inline-wraper">
           <span> element 1 </span>
           <asp:TextBox ID="txt_pwd" runat="server" TextMode="Password"></asp:TextBox>   
       </div>
   </div>
   <div class="row"> 
       <div class="inline-wraper">
           <span> element 2 </span>
           <asp:TextBox ID="txt_pwd" runat="server" TextMode="Password"></asp:TextBox>   
       </div>
   </div>
</div>

an example of 2 unaligned inline-wrapers

the 2 spans to be resized

i’m looking for a way to re-size my spans so the inline-wrapers would “align” on top of each other , or some different approach of archiving this with out playing with the padding
of the top one to fit the full width of the wraper(the reason for that is that it’s a reoccurring problem).

i hope this was clear enough
thanks in advance
eran.

  • 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-26T04:47:47+00:00Added an answer on May 26, 2026 at 4:47 am

    Not sure if I clearly understood your question.

    Anyway, if you don’t care about having an fixed width for your span you could use:

    span {
       width: 90px;
       float: right;
    }
    

    If fixed width is an problem, maybe you could use a <table>.

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

Sidebar

Related Questions

I need to center align images (variable width and height) inside block level elements
I need help to align CSS buttons. I tried many different variations and I
I need to align two divs next to each other, so that each contains
I have three values I need to align in a dropdown box. How can
I need to align an inner div with the bottom of an outer div.
I've got a project where I need to top-right align a div so that
This is my markup, I need to align gray label under the blue label
This is a two part question - first I need to get every element
I need a css gunu out there to help me with this one. Right
I need to have a single <li> element which has two buttons inside of

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.