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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:58:09+00:00 2026-05-15T11:58:09+00:00

i have following HTML structure: <div class=container> <div class=sidebar></div> <div class=content></div> <div class=subscript></div> </div>

  • 0

i have following HTML structure:

<div class="container">
   <div class="sidebar"></div>
   <div class="content"></div>
   <div class="subscript"></div>
</div>

I need following layout:

┌─────────┬───────────────────────┐
│         │                       │
│ sidebar │       content         │
│         │                       │
│         │                       │ 
├─────────┤                       │
│         │                       │
│    w    ├─────────┬─────────────┤
│         │subscript│      w      │
└─────────┴─────────┴─────────────┘

w – is white-space

Container must have fixed width and flexible height (must expand to fit its content)

Sidebar must have fixed width and height and be top-aligned.

Content must be on the right hand side of sidebar and take all free horizontal space. It must be vertical expandable, to fit its text

Subscript must be positioned right below content and be left-aligned with it. Also, it must be expanded horizontally, to fit its text (subscription)

How it can be done, using pure CSS?

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

    Advanced? Hardly. Most simply:

    /* Fix page width. As per requirements, but questionable IMO. Why not liquid? */
    .container { width: 750px; margin: 0 auto; }
    
    /* Sidebar on left, other elements moved to the right */
    .sidebar { float: left; width: 150px; }
    .content, .subscript { margin-left: 150px; }
    
    /* Make subscript shrink its width to fit its content */
    .subscript { display: inline; }
    

    This is cheating a bit in making the subscript inline in order to make its dimensions ‘shrink-to-fit’ its text. This might or might not be acceptable depending on what .subscript actually is.

    There are a few other ways you can do that if you want .subscript to remain a block-display element. For example, float: left without an explicit width on the .subscript. Then you’d need either an explicit clear: left on a new element just before the end of the container, or, if you prefer not to change the markup at all, a self-clearing hack on .container (such as the overflow: hidden hack as mentioned by dhabersack; check the hasLayout fixes for that if you need IE6 support).

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

Sidebar

Ask A Question

Stats

  • Questions 532k
  • Answers 532k
  • 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 Several existing Perl modules, including Parallel::ForkManager and Forks::Super (of which… May 17, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer If I got this right, you need to use MySQL… May 17, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer There are tools that are able to solve captchas. A… May 17, 2026 at 12:17 am

Trending Tags

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

Top Members

Related Questions

I have the following DOM structure: /*:DOC += <div id='testDiv' class='testDivClass'><div id='innerTestDiv'></div></div><span id='testSpan' class='testSpanClass'><span
I have the following HTML. <body> <div class=header></div> <div class=navdiv></div> <div class=mainarea> <p></p> <table>
I have the following HTML structure: <div><a href=link1>blah</a></div> <div><a href=link2>blah</a></div> <div><a href=link3.swf>blah</a></div> <div><a href=link4>blah</a></div>
i have the following div structure with respective ids : <div id=border_1 class=track_mc01302 track_01_mc01302>
Hey guys, I have the following HTML structure that I am trying to pull
Suppose I have following frame structure. <frameset rows=20%,60%, *> <frame name=theFrame id=theFrame src=test1.html >
I have the following structure /templates/base.html templates/index.html --- here i have inherited base.html which
I currently have a drop-line horizontal menu using an unordered list with the following
The following is my first cut at coding-up a reddit-like comment in html+css. I
I have the following bit o' jquery: // Code for Side Navigation $(#sideNav ul

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.