By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,966 Members | 1,975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,966 IT Pros & Developers. It's quick & easy.

How do i restrict the size of inputed text

100+
P: 196
The problem is as follows, i am inputing text and images from another source via my php script, now when i try to display the text and images into a page of my own styling the text and images skewed the page speciffically the table cell it is contained within.

First i thought that it was just a problem with the images so i just reduced the size of them but now it seems the text is somehow managing to stretch the cell.

So i tried limiting the size of the table cell to no avail, then tried putting the text and images into a <div> container and then using styling to restrict the width of cell, this also didn't work.

Now i have no idea how to restrict the size of the images and text;

Any help with this problem is greatly appreciated, Thanks

P.s. heres the code I have for the formatting so far-

Expand|Select|Wrap|Line Numbers
  1. <td valign="top" height="100%" align="center">
  2.     <div style="width: 326px; max-width: 326px; text-align:center;">
  3.     <p align="center">
  4.     <? include('test.php'); ?>
  5.     </p> 
  6.     </div>  
  7.     </td>  
Dec 28 '08 #1
Share this Question
Share on Google+
4 Replies


Dormilich
Expert Mod 5K+
P: 8,639
If you're using Firefox you can use the Firebug plugin to actually show the applied CSS properties.

maybe the property overflow can help you.

regards
Dec 28 '08 #2

100+
P: 196
thanks for the help ill check that out
Dec 31 '08 #3

Expert 100+
P: 1,892
What does test.php look like? You shouldn't have any problems including text or images if they are linked correctly in your php file. Also if you're using IE 6 I don't think max-anything works.
Jan 3 '09 #4

Expert 100+
P: 164
I added an overflow:hidden property to the DIV. I believe that should solve the problem of it stretching - but if any content does extend beyond the limited width, it'll appear cut off.

If this does not work, try placing the overflow:hidden property on the TD.

Expand|Select|Wrap|Line Numbers
  1. <td valign="top" height="100%" align="center"> 
  2.     <div style="width: 326px; max-width: 326px; text-align:center; overflow: hidden;"> 
  3.        <p align="center"> 
  4.           <? include('test.php'); ?> 
  5.        </p>  
  6.     </div>   
  7. </td>  
  8.  
Welcome to the problems with content management.
Jan 5 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.