View Full Version : <pre> skips a line?

01-04-2008, 01:43 AM
I want to display description "as is" which is retrieved from the database (has a fixed length of 30). I used <pre> element and each row skips a line. What am I doing wrong? Here is the code:


<table cellspacing="0">
<td>Item No</td>
<td><pre>TOMATOES 12DZ</pre></td>
<td><pre>BANANAS 24DZ</pre></td>


01-04-2008, 01:56 AM
If you have CSS document, add this to it:

pre { display: inline; }

or if you don't, add this inside your head tags:

<style type="text/css">
pre { display: inline; }

01-04-2008, 02:14 AM
Worked. Thanks.