scarlson Posted December 6, 2007 Share Posted December 6, 2007 I am pre-loading data from mySQL into a bunch of textarea boxes. The problem is, is that the text is coming up centered inside the textarea box and not aligned left. I have tried to use the align = "left" but that didn't help it at all. I do have a <center></center> wrapped around the whole form, would that be causing it? Here is an example of one of my textarea boxes. <label>Baby Girl Clothes <textarea name="tod_girl_clothes" id="tod_girl_clothes" cols="45" rows="5" align="left"> <?php echo $itemsid_array['tod_girl_clothes'] ?></textarea> </label> Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 6, 2007 Share Posted December 6, 2007 maybe? remove all the alignment and see what happens ! Quote Link to comment Share on other sites More sharing options...
marcus Posted December 6, 2007 Share Posted December 6, 2007 <textarea style="text-align:left;"></textarea> Quote Link to comment Share on other sites More sharing options...
scarlson Posted December 6, 2007 Author Share Posted December 6, 2007 I tried both suggestions and that didn't work. BUT when I moved my <?php line all the way to the left hand side of my codes space it moved my text over to the left as well. However, I only have data loading into 2 of the textboxes first for testing but one of them is correct and the other one has a line return first then the data aligned to the left. <table width="200" border="1" bordercolor="#000000"> <caption> Please list items in the correct category </caption> <tr> <td> <label>Baby Girl Clothes <textarea name="tod_girl_clothes" id="tod_girl_clothes" cols="45" rows="5" style="text-align:left;"> <?php echo $itemsid_array['tod_girl_clothes'] ?></textarea> </label> </td> <td> <label>Baby Boy Clothes <textarea name="tod_boy_girls" id="tod_boy_girls" cols="45" rows="5" style="text-align:left;"> <?php echo $itemsid_array['tod_boy_clothes'] ?></textarea> </label> </td> </tr> The first textarea box is the one showing the line return first then the data and the next textarea box is showing the data correctly. Any ideas? Quote Link to comment Share on other sites More sharing options...
scarlson Posted December 6, 2007 Author Share Posted December 6, 2007 for the most part it's working but I still have the data in the first textarea box start one line down like someone hit the return key. Quote Link to comment Share on other sites More sharing options...
kts Posted December 6, 2007 Share Posted December 6, 2007 Try trim($variable) to remove any spaces that aren't necessary.. that might help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.