Take the 2-minute tour ×

hi can someone help me please, my computers driving me insane, it was working yesterday and now its not, ive tried on my computer too and on a different browser nothing is correcting this problem.

Basically i have a news board, with news feeds that pull through from mysql.

I am trying to encase the text in a div called 'news_feeds_board_text' so that i can position it how i want.

whatever width or padding i give this text it still overflows to the right hand side.

please can someone please show me where im going wrong, would really appreciate it thanks.

for example instead of looking like this how i want it:

The Cat Sat on the 
Fence and licked 
itself over and 
over again.

its doing this:

The Cat Sat on the Fence and licked itself over and over again.

it is overflowing out of the news board and i dont know why. i know its a css issue but i dont know how?

Here's how my divs are laid out with php:

        $social_feeds_set = get_social_feeds_set();
        while ($feeds = mysql_fetch_array($social_feeds_set)) {


        <div class="socialcase" id="socialcase">
        <div class="socialcase_top"></div>
             <div class="socialcase_img">
             <?php echo "<a href=\"profile.php?id={$feeds['user_id']}\"><img width=\"60px\" height=\"60px\" src=\"data/photos/{$feeds['user_id']}/_default.jpg\" /></a>";?></div>

             <div class="social-text">
             <?php echo "{$feeds['display_name']}"; ?> says:<br/><br/><?php echo "{$feeds['content']}"; ?> 

         <? } ?>
 <div class="board-wall-feeds">        
<div class="social_header">
<?php echo "$profile[2]" ?>'s News & Updates:

        $social_news_board = social_news_board();
        while ($news = mysql_fetch_array($social_news_board)) { ?>

        <div class="news_feeds_board">
        <div class="social_clip"></div>
        <div class="news_feeds_board_text"><? echo "{$news['content']}";  ?></div>

        <div class="social_footer">

        $datetime1 = new DateTime();
        $datetime2 = new DateTime ($news['date_added']);
        $mdhms = explode('-',$interval->format('%m-%d-%H-%i-%s'));

$labels = Array(' months', ' days', ' hours', ' minutes', ' seconds');
$i = 0;
foreach($mdhms as $t){
  if($t > 0) break;
        echo "about ".$t.$labels[$i]." ago"; ?></div></div>
        <? } ?>


here's the css for the divs which can only be causing the problem:

.board-wall-feeds {
    text-align: left;
    font-family: Arial;
    font-size: 12px;
    color: #6d6d6d;
    background: #fff;
    border: 1px solid #e6e6e6;
    padding: 20px 15px 20px 15px;
    -moz-box-shadow: 2px 3px 2px #d6d6d6;
    -webkit-box-shadow: 2px 3px 2px #d6d6d6;
    box-shadow: 2px 3px 2px #d6d6d6;
    display: block;


.news_feeds_board {
background: #ffffff;
border-top:1px dashed #ccc;
border-bottom:1px dashed #ccc;


.news_feeds_board_text {
share|improve this question
Can you show the rendered HTML source rather than php? -- you can replace the content –  xivo Feb 8 '13 at 16:59
Could you reduce the amount of code to look at and just provide the bit that does not work. –  Ed Heal Feb 8 '13 at 17:00
add comment

2 Answers

There is nothing wrong with your CSS. the only thing that could effect your display of the text in your code is this : {$news['content']}. What is the value that you get from {$news['content']}? if it contains
then you should remove them and your problem will be solved. Another way to confirm that there is nothing wrong with your CSS is by placing {$news['content']} in the beginning of the document

share|improve this answer
add comment

Agreeing with shnisaka. I find no CSS issues which would have produced what you're seeing.

Try substituting your {$news['content']} with a healthy block of lorem ipsum to test whether it's the content returned from MySQL or the CSS.

share|improve this answer
add comment

Your Answer


