Forum Moderators: not2easy
Stylesheet:
div.profile {
float: left;
width: 20%;
height: 60px;
background-color: #AAAAFF;
padding: 5px;
margin-bottom: 5px;
}
div.message {
float: left;
width: 80%;
height: 60px;
background-color: #BBBBFF;
padding: 5px;
margin-bottom: 5px;
}
HTML:
<DIV CLASS="profile">
test 1<BR>
test 2<BR>
test 3<BR>
</DIV>
<DIV CLASS="message">
testing testing testing
</DIV>
Any ideas on how I could achieve what I want? Thanks.
stylesheet:
table.discussion {
width: 100%;
padding: 5px;
}
TR.header {
width: 100%;
background-color: #8888FF;
}
TR.message {
width: 100%;
}
TD.title {
font-size: 1.3em;
font-weight: bold;
}
TD.time {
text-align: right;
}
TD.profile {
color: red;
text-align: center;
background-color: #AABBCC;
}
TD.message {
color: green;
}
HTML:
<TABLE CLASS="discussion">
<TR CLASS="header">
<TD CLASS="title">Message title</TD>
<TD CLASS="time">0845</TD>
</TR>
<TR CLASS="message">
<TD CLASS="profile">John Caius</TD>
<TD CLASS="message">Here is my message</TD>
</TR>
</TABLE>
and I'm pretty sure it's the border-collapse property that would solve your gaps..
or just add cellspacing="0" to your table HTML code
Suzy
I can't get my cells to span more than one column. I'm applying {column-span: 2} to a <TD> element but it doesn't work. Maybe I can't apply that command to that element, or I'm just being really daft. Any ideas?
Code:
<TABLE>
<TR><TD>1</TD><TD>2</TD><TD>3</TD></TR>
<TR>
<TD STYLE="column-span: 2; background-color: yellow">Message title</TD>
<TD>3</TD>
</TR>
<TR>
<TD>John Caius</TD>
<TD>Here is my message</TD>
<TD>3</TD>
</TR>
<TR><TD>1</TD><TD>2</TD><TD>3</TD></TR>
</TABLE>