473,492 Members | 4,279 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do i restrict the size of inputed text

196 New Member
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
4 3167
Dormilich
8,658 Recognized Expert Moderator Expert
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
chazzy69
196 New Member
thanks for the help ill check that out
Dec 31 '08 #3
AricC
1,892 Recognized Expert Top Contributor
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
Nicodemas
164 Recognized Expert New Member
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

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

Similar topics

0
1014
by: Chishun Kwong | last post by:
Hi, I would like to use xsd to restrict the text in a mixed, complex-type element. My reading so far seems to say that it is not achievable, is this true? I find it hard to imagine. For...
3
1362
by: MrNobody | last post by:
I have a situation where I add over a hundred child MenuItems to a parent MenuItem. When I click the parent which shows a listing of all the child menu items, it is too big to fit on the page, so...
3
2473
by: Agnes | last post by:
In textbox, I know I can set e.handled = false in keypressevent , So I can restrict the user to input some invalid character or disallow the user to input any thing Now, in datagrid, there are 3...
10
8871
by: sconeek | last post by:
hi all, i have a textfield where i would like the user to input only Y or N. can somebody tell me how can i restrict the user from entering any other character, number or special character....
21
6467
by: Niu Xiao | last post by:
I see a lot of use in function declarations, such as size_t fread(void* restrict ptr, size_t size, size_t nobj, FILE* restrict fp); but what does the keyword 'restrict' mean? there is no...
2
3806
by: Tarkeshwar | last post by:
Hi All, I want to restrict the user from being entering the value in <input type="file">. It works fine in IE but not in Mozilla. I am sending my code also which works in IE and not in Mozilla.Can...
1
1353
by: Orin | last post by:
Hello! I'm using php and have a complicated task, so if someone can understand it then please help me to solve it The task is to make function, that will understand user-inputed regexp and...
3
1586
by: geebanga88 | last post by:
HI i want to create a month query that restricts the records by a month given that is inputed by a user from a form. There is an attribute in the relation called date which should only match the...
6
4054
by: simon2x1 | last post by:
i want an inputed value that a user enter into the textfield should remain after clicking submit and an error message display that invalued email.the email textfield will be blank why the other...
0
7118
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7192
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4579
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1397
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
282
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.