# Text not wrapping

**URL:** <https://www.ruby-forum.com/t/text-not-wrapping/93168>\
**Category:** Rails\
**Created:** [April 28, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/text-not-wrapping/93168 "2007-04-28T16:53:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [April 28, 2007, 4:53pm UTC](https://www.ruby-forum.com/t/text-not-wrapping/93168/1 "2007-04-28T16:53:16Z")

</div>

Hi:

I’ve got a small message application I’m trying to build. For some  
reason, the message itself isn’t wrapping. I’ve tried a bunch of things

- I’m using a mix of CSS and one table at the end. For whatever reason,  
the message keeps forcing the table to expand, even though the div  
containing the table has a set width. Even when I try to set the width  
for the table with definite pixel widths, the tables expand. Obviously,  
there’s a better way. Can anyone help?

Here’s the partial rendering the table:

| \<%= image\_tag("no\_pic.jpg", :size =\> "60X45", :alt =\> "user picture") %\> | 
**From:** \<%=h User.find(msg.from\_id).name %\>  
 **Subject:** \<%=h msg.subject %\>  
 **Sent:** \<%=h time\_ago\_in\_words(msg.send\_on) %\> ago
 | 
\<%=h msg.body %\>
 |
| &nbsp; | \<%= link\_to "Reply" %\> | \<%= link\_to "Forward" %\> | \<%= link\_to "Delete" %\> | \<%= link\_to "Expand" %\> | \<%= link\_to "Collapse" %\> | |

And the containers holding the table:

```
<div id="centerMsg">
  <span class="XLgTextBl">Message Center</span>
  <button onclick="showPopWin('/messages/new', 500, 350,

```

null);"\>Message

  

  

&nbsp;
  
\<% for message in @messages %\>  

  
\<%= render(:partial =\> ‘/messages/message’, :locals =\> {  
:msg =\> message}) %\>  

* * *
  

  
\<% end %\>  

  

```
    </div>
</div>

```

And the relevent css styles:

#centerMsg  
{  
float: bottom;  
width: 485px;  
padding-top: 10px;  
padding-bottom: 10px;  
padding-left: 10px;  
margin-bottom: 10px;  
background-color: white;  
-moz-border-radius : 1em;  
border-radius : 1em;  
overflow: visible;  
}

#msgInfo  
{  
position: relative;  
float: left;  
text-align: left;  
}

#msgBody  
{  
position: relative;  
float:left;  
text-align: left;  
overflow: scroll;  
}  
#msgBodyLinks  
{  
text-align: right;  
}

.tabPane{  
height:21px; /\* Height of tabs _/  
border-bottom:1px solid #919b9c;  
}  
.aTab{  
border-left:1px solid #919b9c;  
border-right:1px solid #919b9c;  
border-bottom:1px solid #919b9c;  
overflow: scroll;  
}  
.tabPane DIV{  
float:left;  
height:100%; /_ Height of tabs \*/  
vertical-align:middle;  
background-repeat:no-repeat;  
background-position:bottom left;  
cursor:pointer;  
position:relative;  
bottom:-1px;  
margin-left:0px;  
margin-right:0px;  
}  
.tabPane .tabActive{  
background-image:url(‘tab\_left\_active.gif’);  
margin-left:0px;  
margin-right:0px;  
z-index:10;

}  
.tabPane .tabInactive{  
background-image:url(‘tab\_left\_inactive.gif’);  
margin-left:0px;  
margin-right:0px;  
z-index:1;  
}

Any help you can provide would be great! I’m sure I’ve got conflicting  
parameters in these styles and tables, but I can’t seem to get it to  
work! Thanks so much for your time!

Mike

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [April 28, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/text-not-wrapping/93168/2 "2007-04-28T17:00:02Z")

</div>

UPDATE:

Even

's not working!!!

Thanks again!

Mike
