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:
<table width="100%">
<tr>
<td width="15%" align="left">
<%= image_tag("no_pic.jpg", :size => "60X45", :alt
=> "user picture") %>
</td>
<td width="30%" align="left">
<div class="msgInfo">
<span class="bodyTextBlk"><strong>From:</strong>
<%=h User.find(msg.from_id).name %><br />
<strong>Subject:</strong>
<%=h msg.subject %><br />
<strong>Sent:</strong>
<%=h time_ago_in_words(msg.send_on) %> ago</span>
</div>
</td>
<td width="55%" align="left">
<div class="msgBody">
<span class="LgTextGr">
<%=h msg.body %>
</span>
</div>
</td>
</tr>
<tr>
<td width="15%" align="left">
</td>
<td width="30%" align="left">
<%= link_to "Reply" %> |
<%= link_to "Forward" %> |
<%= link_to "Delete" %>
</td>
<td width="55%" align="right">
<%= link_to "Expand" %> |
<%= link_to "Collapse" %> |
</td>
</tr>
</table>
And the containers holding the table:
<div id="centerMsg">
<span class="XLgTextBl">Message Center</span>
<button onclick="showPopWin(''/messages/new'',
500, 350,
null);">Message</button>
<div id="tabView1">
<div class="aTab">
<div class="spacerH10"> </div>
<% for message in @messages %>
<div class="inboxMsg">
<%= render(:partial => ''/messages/message'',
:locals => {
:msg => message}) %>
<hr>
</div>
<% end %>
</div>
<div class="aTab">
</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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---