Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table fitting problem

Status
Not open for further replies.

louistaub

Programmer
Sep 21, 2001
20
0
0
GB
I've been trying for a quite a while to fit the radio buttons and the text together to fit onto 2 seperate lines, but they always seem to default to three lines or 2 lines with the text on the wrong line.
here is my code, run this and it should became clear what I am trying to do.

<HTML>
<HEAD>
<TITLE>Layout V2</TITLE>
<STYLE TYPE=&quot;text/css&quot;>
BODY { font-family: Arial, Helvetica, Sans-Serif; font-size: 9pt; }
.cm12dl { width: 11cm; background: #FFE1B0; font-family:Arial,Helvetica,Sans-Serif;

font-size:8pt;text-align:left; vertical-align:top; }
.qty { width: 8.5cm; background: #FFEFCE; font-family:Arial, Helvetica, Sans-Serif;

font-size: 8pt; text-align:left; }
</STYLE>
</head>
<body>
<table>
<TR>
<TD CLASS=&quot;cm12dl&quot; COLSPAN=2>
<TEXTAREA ROWS=2 READONLY CLASS=&quot;qty&quot; name=selections>
 
sorry it didn't all fit in
rest --
<samp style=&quot;vertical-align:top;font-size:8pt&quot;>code</samp>
<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;vertical-align:top;font-size:8pt&quot;>
<samp style=&quot;vertical-align:top;font-size:8pt&quot;>desc</samp>
<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;vertical-align:top;font-size:8pt&quot;>
</TD>
</TR>
</table>
</body>
</html>
Can anyone get this to fit onto 2 lines?
thanks for any help

Louis Taub
 
Can you explain where your getting this <samp> tag from?
 
nm, havn't had my coffe yet. I don't know if its your problem, but in your posted code there is no </textarea> tag.

From what I can tell, your question is an asthetic one, so are you just trying to lay it out nicely? Try this:

this replaces your table cell
Code:
<TD CLASS=&quot;cm12dl&quot; COLSPAN=2>
<center>
<TEXTAREA ROWS=2 READONLY CLASS=&quot;qty&quot; name=selections></textarea><br>
<samp style=&quot;vertical-align:top;font-size:8pt&quot;>code</samp>
<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;vertical-align:top;font-size:8pt&quot;>
&nbsp;|&nbsp;
<samp style=&quot;vertical-align:top;font-size:8pt&quot;>desc</samp>
<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;vertical-align:top;font-size:8pt&quot;>
</center>
</TD>
[code]
 
That idea does work, but I need the radio buttons to be next to the text area. The table is part of a larger table and I have run out of space on the screen, which is why I cannot afford another line.

Any other ideas would be much appreciated.

Louis Taub
 
Try something like this:

<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;margin-left:-30;vertical-align:top;font-size:8pt&quot;>

<input type=&quot;radio&quot; name=&quot;co&quot; style=&quot;margin-left:-30;vertical-align:top;font-size:8pt&quot;>

You can also add position:absolute; or position:relative; to see what that brings,

Hope this helps,
Erik
 
Thanks for the advice, it's helped a lot

Louis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top