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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:10:07+00:00 2026-05-11T11:10:07+00:00

I have a problem in HTML. I have divided the HTML page into two

  • 0

I have a problem in HTML. I have divided the HTML page into two columns:

My code:

<div id='outer'>         <div id='inner1'>     <div id='data1'>     </div>     <div id='response'>     </div>   </div>    <div id='inner2'>     <div id='data2'>     </div>   </div> </div> 

My CSS:

#outer {      background-color:#FFFF99;            } #inner1 {      float: left;      width: 62%; } #inner2 {      float: right;       width: 38%; }    

I need to insert another column #inner1_2 in between inner1 and inner2 which is the optional one.

There is also a third column:

<div id='#inner1_2'> </div> 

The problem here is the variable division. Either I have three columns or two columns depending on the data:

  • inner2 is fixed
  • If there are three columns of data, .inner1 needs to be split into two halves, otherwise .inner1 remains as it is.

This is more complex logic than I am comfortable with in CSS.

What is the best way to handle this?

  • 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. 2026-05-11T11:10:08+00:00Added an answer on May 11, 2026 at 11:10 am

    Add a class to the outer div that controls how the inner divs are displayed. Setting the class to ‘twoColumn’ hides the middle column and setting the class to ‘threeColumn’ shows the middle column:

    <div id='outer' class='twoColumn'>    <div id='inner1'>       <div id='data1'>       </div>       <div id='response'>       </div>    </div>    <div id='inner1_2'>    </div>    <div id='inner2'>       <div id='data2'>       </div>    </div> </div> 

    css:

    #outer { background-color: #FF9; } #inner1 { float: left; } #inner1_2 { float: left; } #inner2 { float: left; width: 38%; } .twoColumn #inner1 { width: 62% } .twoColumn #inner1_2 { display: none; } .threeColumn #inner1 { width: 31%; } .threeColumn #inner1_2 { width: 31%; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 84k
  • Answers 84k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I just answered this in your other post: Why is… May 11, 2026 at 5:02 pm
  • Editorial Team
    Editorial Team added an answer history -c -uUSERNAME -D2009-03-25 Lists all checking done by since… May 11, 2026 at 5:02 pm
  • Editorial Team
    Editorial Team added an answer For usual crypto hashes (MD?, SHA? etc.), openssl is the… May 11, 2026 at 5:02 pm

Related Questions

I have a problem with dividing a multicolumn layout in HTML. I have divided
I have an HTML page divided vertically into Header Body Footer The body in
I am using Python to read in data in a user-unfriendly format and transform
I'm building a desktop application right now that presents its human-readable output as XHTML

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.