What I’m trying to do is this:

In text form:
XXX Some text here YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY ZZZZZZZZZ
Body body body Sidebar!
Body body body Sidebar!
Body body body Sidebar!
X, Y, and Z are images (3 images total). Y can stretch along the X axis, and does so above, to fill the available space. (But doesn’t cause “Some text here” to get squished and start breaking into multiple lines)
I’d like to keep the “Some text here” part in one line. A line breaking here will not end happily.
Is this possible, or should I simplify the layout around HTML?
My current attempt using tables:
<table cellspacing="0" cellpadding="0" border="0" style="height: 20px; width: 100%;">
<tr>
<td style="width: 205px; height: 20px; background: url('images/horz_bar_left_end.png');"> </td>
<td style="width: 5px; height: 20px; background: url('images/transparent.gif');"/> </td>
<td valign="center" style="height: 20px; white-space: nowrap; font-weight: bold;">THIS IS A TITLE</td>
<td style="width: 5px; height: 20px; background: url('images/transparent.gif');"> </td>
<td style="width: 100%; background: url('images/blue.gif');"> </td>
<td style="width: 190px; height: 20px; background: url('images/horz_bar_right_upper.png');"> </td>
</tr>
</table>
Close… ish. All of the columns (except the one with the text, and the width: 100% one) are ignoring their CSS width attribute in both Firefox and Chrome. This is what it looks like:

My attempt using <div> and all that CSS jazz.
<div style="white-space: nowrap;">
<div style="float:left; width: 25px; height: 20px; background: url('images/horz_bar_left_end2.png');"> </div>
<div style="float:left;">Some Text</div>
<div style="float:left; width: 100%; height: 20px; background: url('images/blue.gif') repeat;"> </div>
<div style="float:left; width: 190px; height: 20px; background: url('images/horz_bar_right_upper.png');"> </div>
<div style="clear: both;"></div>
<div style="float:left; width: 500px;"> body </div>
<div style="float:left; width: 100px;"> sidebar </div>
</div>
…massively fails. It’s on like three lines.
For those wanting to play at home, here are the images:
- horz_bar_left_end.png:

- horz_bar_right_upper.png

- transparent.gif: 1×1 transparent GIF
- blue.png: 1×1 blue PNG. (#0073e4)
You can do with many way to archive your web layout.
Code update and look at http://jsbin.com/awudi4/