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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:54:20+00:00 2026-05-22T23:54:20+00:00

What I am trying to accomplish is having a fixed-width first div and a

  • 0

What I am trying to accomplish is having a fixed-width first div and a fluid second div which will fill up the rest width of the parent div’s width.

<div class='clearfix'>
  <div style='float:left; width:100px;'>some content</div>
  <div style='float:left'>some more content</div>
</div>

and on this one everything seems alright and fluid.

<div style='display:table'>
  <div style='display:table-cell; width:100px;'>some content</div>
  <div style='display:table-cell'>some more content</div>
</div>

I want to go ahead with the second one but i feel like the second example will give me headaches in the future.

Could you offer some suggestions or insights?

  • 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-22T23:54:21+00:00Added an answer on May 22, 2026 at 11:54 pm

    display: table-cell is perfectly fine to use, with just one downside..

    It doesn’t work in IE7 (or IE6, but who cares?): http://caniuse.com/#search=css-table

    If you don’t need to support IE7, then feel free to use it.

    IE7 still has some usage, but you should check your Analytics, and then make a decision.


    To answer your specific use case, you can do it without display: table-cell, provided that you don’t need the height to adjust based on content:

    http://jsfiddle.net/g6yB4/

    <div class='clearfix'>
      <div style='float:left; width:100px; background:red'>some content</div>
      <div style='overflow:hidden; background:#ccc'>some more content</div>
    </div>
    

    (why overflow: hidden? With: http://jsfiddle.net/g6yB4/3/ vs without: http://jsfiddle.net/g6yB4/4/)

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

Sidebar

Related Questions

This is my first time trying to accomplish core data and been having some
I'm trying to accomplish a task, but having some difficulty.Can someone set me straight
I am trying to accomplish the following: 1. On click, have a div with
Okay, So what I am trying to accomplish is having the navigation updated with
What I'm trying to accomplish with this code is, first it scans a directory
I have been trying to accomplish the same as many frameworks do: having the
Will start with what I am trying to accomplish. I wrote up a menu
I'm trying to accomplish a simple task of creating a database with 2 tables
I'm trying to accomplish the following in ASP.Net: Create a WPF Canvas control Spin
What I am trying to accomplish here is to separate a firstname, lastname combo

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.