Connecting Tech Pros Worldwide Help | Site Map

How do i restrict the size of inputed text

Familiar Sight
 
Join Date: Sep 2007
Posts: 181
#1: Dec 28 '08
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>  
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,641
#2: Dec 28 '08

re: How do i restrict the size of inputed text


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
Familiar Sight
 
Join Date: Sep 2007
Posts: 181
#3: Dec 31 '08

re: How do i restrict the size of inputed text


thanks for the help ill check that out
Expert
 
Join Date: Oct 2006
Location: NC
Posts: 1,722
#4: Jan 3 '09

re: How do i restrict the size of inputed text


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.
Expert
 
Join Date: Nov 2007
Posts: 126
#5: Jan 5 '09

re: How do i restrict the size of inputed text


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.
Reply