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 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

I am trying to accomplish something that seemed quite simple... I have 3 div
Basically I'm trying to accomplish the same thing that mailto:bgates@microsoft.com does in Internet Explorer
What I'm trying to accomplish My app generates some tabular data I want the
So I am trying to accomplish something like this: SELECT * FROM table WHERE
I could probably write this myself, but the specific way I'm trying to accomplish
I am trying to determine the best time efficient algorithm to accomplish the task
I'm doing some form validation, and I'm having trouble with what I'm trying to
I'll do my best to describe what I'm trying to accomplish: Lets say for
SELECT DISTINCT field1, field2, field3, ...... FROM table; I am trying to accomplish the
I am trying to create a rewrite rule that accomplishes two things: Redirect (www.)?domain.com

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.