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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:46:29+00:00 2026-06-07T17:46:29+00:00

How do i keep two elements in the same row with fixed right column?

  • 0

How do i keep two elements in the same row with fixed right column?
I want right div to be with fixed size, and left column fluid, but when in insert long text to left one, then right one goes to the next column..

Example: http://jsfiddle.net/Jbbxk/2/

Is there any pure CSS solutions?

NB! Wrap div must have dynamic width!
For demostration purposes it has fixed witdh, so it will wrap.

Cheers!

  • 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-07T17:46:31+00:00Added an answer on June 7, 2026 at 5:46 pm

    This is one common way of doing what you want:

    .wrap {
        position: relative;
        margin: 5px;
        border: 1px solid red;
    }
    .left {
        float: left;
        background-color: #CCC;
        margin-right: 48px;
    }
    .right {
        position: absolute;
        top: 0;
        right: 0;
        width: 48px;
        height: 48px;
        background-color: #888;
    }
    

    Explanation:

    • The fluid left column fills the whole width but saves space for the right column with margin-right: [right column width];
    • The fixed right column is placed at an absolute position at top 0, right 0 (its correct place)
    • The wrap div is assigned position: relative so the right column position is determined according to it.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want if user moved the mouse for two seconds (Keep the mouse button
Here is my code, I have two checkboxes and want to keep one disabled
I have two select with the same elements (options) in it. What I am
Well, I'm facing a new problem atm. I have two elements fixed to the
As a Java programmer, you usually keep two truths in your pocket: Instance variables
Keep going around circles, but I am still unclear about this. Have a feeling
Functionally, the two blocks should be the same <soapenv:Body> <ns1:login xmlns:ns1=urn:soap.sof.com> <userInfo> <username>superuser</username> <password>qapass</password>
We have two classes: template<typename T, typename Size, typename Stack, typename Sparse> class Matrix
I am having a form and many input elements in that. I want certain
Goal is, I've multiple lists of elements available, and I want to be able

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.