views:

40

answers:

1

I have a parent element that has dynamic text in it that needs to be confined into a certain area. I had users that where writing sentences without using spaces (example:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy etc...) This was breaking the structure of my styled text area.

#ProfileCommentBody{ width:500px;  font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#333333; margin:15px 0px 0px 20px; float:left; background-color:#EAF7FB; padding:10px 10px 10px 10px; position:relative; overflow:hidden;}

I used overflow:hidden,as you can see above in the css code, and it solved the problem but created a new problem. I have another another element that is a image that is absolutely positioned that completes the style of my speech bubble ( the above element is the speech bubble) and when I have the above element on overflow:hidden it make that image disappear. I have tried z-index and that does not work.

.ProfileCommentTail{background:url(images/speechBubbleTail.png) no-repeat top left; width:15px; height:10px; position:absolute; top:20px; left:-15px;}

Is there a different option to use besides overflow:hidden or is there something I can do to counteract the unwanted part of what the overflow:hidden is doing?

html structure:

 <div id='ProfileCommentBody' class='round_10px'>
        <div id='CommentNameProfile'>
            <div class='ProfileCommentTail'>&nbsp;</div>
                <a href='http://www.blahblahblah.org/Profile.php?id=&lt;?php echo $poster->id; ?>'>
                    <?php echo $poster->first_name. " ". $poster->last_name; ?> says...
                </a>
        </div>
</div>

Here is an example of an imgage of what it is doing now,which is wrong (missing speech bubble tail to the right of the polaroid, and the left of the speech bubble) overflow:hidden is causing this to disappear, but fixing another problem I was having: alt text

here is what it is SUPPOSED to look like, notice the tiny blue speech bubble tail connected to the speech bubble: alt text

+1  A: 
<div id="blah">
     <div class='ProfileCommentTail'>&nbsp;</div>
     <div id='ProfileCommentBody' class='round_10px'>
        <div id='CommentNameProfile'>
                <a href='http://www.blahblahblah.org/Profile.php?id=&lt;?php echo $poster->id; ?>'>
                    <?php echo $poster->first_name. " ". $poster->last_name; ?> says...
                </a>
        </div>
      </div>
</div>

This is what I meant by my initial comment. CSS such as:

#blah { position:relative; }

Then again, because there is no layout/design/comp links it's hard to see what you are describing. I suggest posting visual details for visual problems.

meder
okay yeah, I'm gonna add images now, one that is broken, and one that looks how it is supposed to look. I tried what your answer is btw. And thanks again for all of your help
LightningWrist
Just thought you would be interested to know I figured it out. I took the tail <div> completely out of the structure,put it right underneath it, and absolutely positioned it from there.
LightningWrist
I think that's what I meant in one way or another, but cheers.
meder