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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:31:23+00:00 2026-05-26T16:31:23+00:00

I’ve read dozens of posts on this topic, but everyone else is having horizontal

  • 0

I’ve read dozens of posts on this topic, but everyone else is having horizontal overflow issues whereas mine are vertical and solutions like floating, clearing, and overflow param setting seem not to work. Here is the code:

HTML:

        <div style="padding:25px">
                              <? $pieces = explode("|",$row['comments']); foreach ($pieces as $comment) { $comment = explode("~",$comment); ?>
                                <div class="commentdiv" style="padding:10px;border-radius: 5px; position:relative; float:left; width:100%; margin-bottom:25px; background-color:#FFF;"> 
                                    <div class="commentcover" style="clear:both">Written by <i><? echo $comment[1]; ?></i> on <b><? echo $comment[2]; ?></b></div>
                                    <div class="commentholder" style="clear:both"><? echo $comment[0]; ?></div>
                                    <div style="clear:both"></div>
                                </div>
                              <? } ?>
        </div>

CSS:

.commentcover {
    position: absolute;
    top: 0;
    left: 5%;
    width: 90%;
    height: 90%;
    z-index: 500;

    padding:10px;
    background-color: #fff;
    opacity: 0;
    filter:progid:DXImageTransform.Microsoft.BasicImage(opacity=0);
    border-radius: 5px;
    text-align:center
}

.commentholder {
    position:absolute; top:10px; left:5%; z-index:400; width:90%;
}

I’ve been playing with this for quite some time without too much success.. and I don’t want to slap scroll bars on there :/

Here is a link to what I’m working on – the table entry is expanded to reveal multiple separate comments. Mouseover results in the covering div fading in over the comment with an indication of the date and author of the comment. Just toggle open the top table row and mouseover the comments to see what I’m talking about (not working in IE of course). Right now the comment boxes are a set height, but this is not an ideal solution. You can see the longest comment is already overflowing a bit.

What do you guys think?

  • 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-26T16:31:24+00:00Added an answer on May 26, 2026 at 4:31 pm

    Providing a position of absolute is taking the commentholder out of the normal flow of the document. As such, commentdiv, is pretending it is not there, so the text is “overflowing” the containing commentdiv.

    absolute

    An element with position: absolute is taken out of the normal flow of the page and positioned at the desired coordinates relative to its containing block.

    Since the absolutely positioned element is taken out of the normal flow, the normal document flow behaves as if the element is not there: it closes up the space it would take.

    reference: http://www.quirksmode.org/css/position.html

    EDIT:

    I’m not exactly sure what overlap you are trying to achieve, but this CSS will set commentcover over commentholder. I’ve removed opacity:0 to show how it will look. And I left the other styles as close to the original as possible.

    .commentdiv {
        padding:10px;
        border-radius: 5px;
        float:left; /* because the children are floated, floating the parent so height changes */
        width:100%; 
        margin-bottom:25px; 
        background-color:#FFF;
    }
    
    .commentcover {
        position:relative; /* so z-index still works */
        width: 90%;
        margin:0 auto;
        z-index: 500;
        padding:10px;
        background-color: #fff;
        border-radius: 5px;
        text-align:center;
    }
    
    .commentholder {
        position:relative; /* so z-index works */
        float:left;
        z-index:400; 
        width:90%;
        margin-top:-2em;
    }
    
    • 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 a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

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.