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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:42:32+00:00 2026-05-21T19:42:32+00:00

Given the following HTML/CSS, what is the simplest way of implementing a vertical ‘liquid’

  • 0

Given the following HTML/CSS, what is the simplest way of implementing a vertical ‘liquid’ DIV (#ribbon1 and #ribbon2) that grows with the content of the #content DIV?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Test</title>
        <style type="text/css">
            <!--
            html {
                height: 100%;
            }

            body {
                margin: 0;
                padding: 0;
                height: 100%;
            }

            #container {
                position: absolute;
                left: 50%;
                margin-left: -400px;
                top: 0px;
                height: 100%;
                width: 800px;
            }

            #ribbon1 {
                position: absolute;
                left: 702px;
                top: 0px;
                width: 46px;
                height: 100%;
                background-color: red;
            }

            #ribbon2 {
                position: absolute;
                left: 752px;
                top: 0px;
                width: 30px;
                height: 100%;
                background-color: blue;
            }

            #content {
                left:16px;
                width:687px;
            }
            -->
        </style>
    </head>
    <body>
        <div id="container">
            <div id="ribbon1"></div>
            <div id="ribbon2"></div>
            <div id="content">
                <p>Lorem ipsum ea pro lorem tantas platonem, duo ut abhorreant percipitur. Quo elit aperiri disputationi at, cum ex choro vivendo delicatissimi, ne magna conceptam adolescens has. Admodum persecuti reprimique nec ei. Te possim labitur perpetua vix, ad eos audire vituperatoribus. No dicat repudiandae est, nec an assum oporteat concludaturque. Ei pro accumsan consequat dissentiet, pri malis affert at.</p>
                <p>Sed ut diam iudico, vis mutat decore ea. Tota illum officiis ei eum, per mucius consequuntur ex, quo tota vocibus ad. Et liber similique vituperata mel, an inani utamur principes qui. Nostro definitionem ius ad. Usu viris tritani et, ea pri noster takimata delicatissimi. Sea dictas recteque convenire ex, malorum percipit qui ut, an quod placerat ius. Ex sed antiopam principes, te posse alienum est, sea delenit debitis conceptam at.</p>
                <p>Ad clita audire conceptam nec. Eos ei corpora tincidunt dissentiunt, qui ne vocent eripuit habemus. Eum ut oportere incorrupte reformidans, eu ius dicit tibique intellegebat. Ut has noluisse insolens, saepe integre eu mel. Ut vel prima periculis constituam, id nisl principes cotidieque sed, ad per nullam virtute instructior. Et has error oblique nominavi, ut pro magna summo labitur.</p>
                <p>Malorum facilisis ei nec, erant molestiae vim ut. Velit dolor invidunt ut cum. Etiam timeam docendi vix ad, in alii latine hendrerit qui. Ad has idque option, probatus tractatos ut qui, sit altera latine suscipiantur ex. In omnium platonem vel, sea no sumo denique. Ei mei vidisse invidunt interpretaris.</p>
                <p>Quo corrumpit gubergren at, ne mel omnes adipisci ullamcorper, scripserit efficiantur mei eu. In reque mazim mea. Mea ex sonet inermis volutpat. Habemus erroribus in sed, no est mutat clita. Harum urbanitas scriptorem qui at, pri cu expetenda referrentur. Has alia ullum tractatos te, his justo laoreet consetetur ex.</p>
                <p>Et oratio consul pro, ei pri equidem tibique ullamcorper. Mucius eligendi assentior cu sea. His ut tota postulant accommodare, putant eligendi scaevola id cum, option vocibus scribentur est in. Pro splendide appellantur ut, an elit omnis audire vix. Habeo tincidunt usu id, sed diam splendide vituperatoribus te.</p>
                <p>Tractatos mediocrem ea usu, id deleniti recusabo cotidieque cum. Cu mea eruditi salutandi. Eu usu dolore partem salutatus, detracto fabellas mel no. Ex ius falli prompta invidunt, et est possim constituam dissentiunt.</p>
                <p>Legendos prodesset ad sed, labore viderer periculis ad eam, stet sadipscing id pri. Ex sea quis quidam, no natum adipiscing efficiendi eum. Noluisse antiopam repudiare ex vel, tation principes eam ea. Eam illud oratio tempor ei, feugiat dolorum accusamus mel ei. Cu cum suas nibh.</p>
                <p>Natum primis apeirian nec an, te duo eros tation lucilius. Iusto dicam necessitatibus est at, at nominati atomorum his. Aliquid verterem laboramus ei has, suas augue postea et pro. Velit euripidis ne est, an inermis minimum qui. Cum dico animal neglegentur no.</p>
                <p>Pro probo veritus cu. Ex quis pertinax cum. Sumo senserit in ius. Dicam melius in cum. Nobis partem te usu, ut suas ornatus nec, ut tantas mucius possit ius. Unum definitiones pri ne, suas legimus volutpat sit ea. Eos dicat senserit electram id, te usu congue delicata reformidans, pro ut cibo minim.</p>
            </div>
        </div>
    </body>
</html>

I have read that absolute positioned child DIVs don’t allow their parent DIV to grow with them, and I’d like to avoid writing some JS that dynamically resizes them. Any help would be appreciated!

  • 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-21T19:42:33+00:00Added an answer on May 21, 2026 at 7:42 pm

    Changing #container to the following seemed to work for me in Chrome, Safari, opera and FF (untested on IE).

    #container {
        position: relative;
        left: 50%;
        margin-left: -400px;
        top: 0px;
        width: 800px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following XML structure <html> <body> <div> <span>Test: Text2</span> </div> <div> <span>Test: Text3</span>
Given the following HTML <div style=width: 500px; height: 500px; border: 1px solid red;> <div
Given the following HTML: <ul> <li><div>Some content</div></li> <li><div>some more content</div></li> <li><div>final content</div></li> </ul> I
Given the following code: HTML: <div id=nav_bar> <ul> <li ><a href=# class=current>HOME</a></li> <li><a href=#>GALLERY</a></li>
I have the following html code (in the given order) <div id=content>...</div> <div id=footer>...</div>
Given the following HTML: <select name=my_dropdown id=my_dropdown> <option value=1>displayed text 1</option> </select> How do
I'm looking for a single line regex which does the following: Given a HTML
Given the URL (single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using
Given the following: List<List<Option>> optionLists; what would be a quick way to determine the
Given the following HTML page a horizontal line appears at the top of the

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.