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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:38:53+00:00 2026-06-02T04:38:53+00:00

If there is a better design approach, or easily searchable phrase I can google,

  • 0

If there is a better design approach, or easily searchable phrase I can google, feel free to let me know and I’ll quickly take this down. Unfortunately, I don’t think I am Googling the right terms.

To skip the explanation, there is a link to the fiddle at the bottom.


I have a right column that must always be against the right side, and never pushed down.

I have left-side elements that should be inline until they collide with the right column, then they should clear to the next row.


I assumed this could be done by floating the left-side elements to the left, and my right column floated to the right. I can’t clear any single left-side element because each left-side element is of variable width.

HTML

<div class='left-el'>
    <ul>
        <li>Variable width</li>
        <li>Variable height</li>
        <li>Left margin must always be against left-side</li>
    </ul>
</div>
<div class='left-el'>
    This column needs to move to the next<br/> 
    line since there is no room left. <br/>
    Instead, it pushes the right-floated div down<br/> 
    to make room.
</div>
<div id='right-col'>
    <ul>
        <li>Variable width</li>
        <li>100% height</li>
        <li>Right margin must always be against right-side</li>
    </ul>
</div>​

CSS

.left-el {
    background-color: orange;            
    float: left; 
    margin-right: 10px;
}

#right-col {
    background-color: green;
    float: right; 
    height: 100%;
}​

Conditions

  • Right col must always be aligned to the right
  • Right col must be variable width
  • Left elements must be variable width
  • Left elements should never interfere with right col

This is what I’ve been working with: http://jsfiddle.net/TmSuD/ (markup from above)

Perhaps a table is appropriate 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-06-02T04:38:55+00:00Added an answer on June 2, 2026 at 4:38 am

    I believe that if you put the right column above the left columns in html it will do what you want.

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

Sidebar

Related Questions

Is there way to better identify design pattern in source codes, esp. if you
Is there better way to delete a parameter from a query string in a
Is there better way to enumerate all photos on the device than this one?
Is there a better solution to the problem of looking up multiple known IDs
Is there a better way to generate HTML email in C# (for sending via
Is there a better way than using globals to get interesting values from a
Is there a better way to control the space between certain block elements.. i
Is there a better way to wait for queued threads before execute another process?
Is there a better/shorter way to write the whoAmI method in the following code?
Is there a better way than this to splice an array into another array

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.