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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:04:54+00:00 2026-06-15T08:04:54+00:00

I have an outer DIV as follows. When I check in the browser the

  • 0

I have an outer DIV as follows. When I check in the browser the outer DIV given the class colx2-right is the correct size of almost half of the area it’s inside of.

.colx2-right {
    float: right;
    margin-bottom: 0;
    width: 48%;
}

Inside of the above DIV I have a CSS table defined with:

div.container {
    display: table;
}

If there is a lot of data in one of the columns then text overflows the edges of the colx2-right DIV. Is there some way I could get it to stay within the boundry of the colx2-right DIV?

I created a fiddle that shows the problem. Here you can see the color of the yellow and red backgrounds is just less than 50% but the red background does not constrain the table inside of it.

fiddle

  • 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-15T08:04:55+00:00Added an answer on June 15, 2026 at 8:04 am

    I would say setting a width 100% on the div.container should make it work the way you want.

    If that is not the case, I am probably not understanding your question correctly. It would help if you tossed an example in http://www.jsfiddle.net so there can be no confusion.

    Another thought (though i’ve never used display: table on a div): since you used display: table, we might asume the div is in fact a table. That would also mean the table-layout properties apply.

    Try setting table-layout:fixed; and setting the 100% width.

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

Sidebar

Related Questions

I have a hierarchy as follows: <div class=outer> <h1>Heading</h1> <p>Paragraph</p> <p><a>Link</a></p> <div class=inner> <h1>Heading</h1>
I have this div structure <div class=panel> <div class=north></div> <div class=center></div> </div> The outer
Say, we have: <div class=outer> <div class=inner> <span class=text>Hello!</span> </div> </div> The 'outer' div
I have the following html code: <div class=outer ui-draggable style=position: relative;> <div class=inner>Foo bar</div>
I have the following HTML structure: <div class=outer> <div class=inner> <a href=#/> <a href=#/>
I have the following code: <div class=outer-div> <img onmouseover=showDiv(this) src={{ STATIC_URL }}/images/user_male.png> <a onmouseout=hideDiv(this)
I have sample div structure: <div id=outer style=width:600> <div class=inner></div> <!--row1--> <div class=inner></div> <div
I have code like this: <div class='outer'> <div class='imgwrapper'><img /></div> <div class='caption'>This is a
I have two divs, on the outer div I have given an opacity of
i have the div element <div title=View this search: Actives> <div style=float:right;> <span class=count

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.