How do i restrict the size of inputed text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    How do i restrict the size of inputed text

    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-

    Code:
    <td valign="top" height="100%" align="center">
        <div style="width: 326px; max-width: 326px; text-align:center;">
        <p align="center">
    	<? include('test.php'); ?>
        </p> 
        </div>  
    	</td>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    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

    Comment

    • chazzy69
      New Member
      • Sep 2007
      • 196

      #3
      thanks for the help ill check that out

      Comment

      • AricC
        Recognized Expert Top Contributor
        • Oct 2006
        • 1885

        #4
        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.

        Comment

        • Nicodemas
          Recognized Expert New Member
          • Nov 2007
          • 164

          #5
          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.

          Code:
          <td valign="top" height="100%" align="center"> 
              <div style="width: 326px; max-width: 326px; text-align:center; overflow: hidden;"> 
                 <p align="center"> 
                    <? include('test.php'); ?> 
                 </p>  
              </div>   
          </td>
          Welcome to the problems with content management.

          Comment

          Working...