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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:38:22+00:00 2026-05-12T07:38:22+00:00

I’m converting a bunch of tables into divs, the layout itself is very simple

  • 0

I’m converting a bunch of tables into divs, the layout itself is very simple and so far it works great in both ie and ffx. BUT, when the content of a div doesn’t fit then it grows out of it, and pushes everything after it down…in other works, makes a mess
The layout is like this,

<div class="wrapper">
    <div class="left">picture</div>
    <div class="right">
        <div class="title"> title</div>
        <div class="content">body</div>
    </div>
 </div>

Right floats right, title goes on top within right and content is under it,left floats left and spans the height of right (originally that was a rowspan=2). the problem comes with wrapper who needs to have a fixed height, because its parent doesn’t have any (so I can’t use %), and since the content is dynamic I don’t know beforehand what height I need. If I get rid of height, the div expands, but the styling of the div (bg color,border etc) disappears because it now has height 0.

Also, I’m working on a pre-existing code which ideally I don’t want to clutter too much with javascript hacks, but if I have no choice then I will. So, what can I do?

div.wrapper{ height: 150px ; width: 100% ; } 

div.left{ height: 100% ; float: left ; width: 25% ; text-align: center ; } 

div.right{ float: right ; height: 100% ; } 

div.title{ width: 100% ; height: 50px ; } 

div.content{ width: 100% ; height: 100px ; text-align: center ; }
  • 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-12T07:38:22+00:00Added an answer on May 12, 2026 at 7:38 am

    Firstly, do not use <div class="title">, use <h1>.

    That being said I’d say you could try playing around with the height property… but without CSS it’s hard to tell what’s going on.

    Another trick is putting a background on the wrapper to fake that the left div is expanding all the way to the bottom. Left and Right float left and right with fixed width and it looks fine.

    EDIT:

    Ok, after seing the CSS, I’d say that what you want to do is to add a clear:both at the end of the wrapper as such:

    <div class="wrapper">
        <div class="left">picture</div>
        <div class="right">
            <div class="title"> title</div>
            <div class="content">body</div>
        </div>
        <div style="clear both;"></div>
     </div>
    

    Then, the “hack” that would work for this is to set the background that would normally be in Left in the wrapper. Like this it will look that Left is styled when really it’s the wrapper that contains the styling.

    By the way, don’t go div.class, just use .class

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am currently running into a problem where an element is coming back from
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am writing an app with both english and french support. The app requests

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.