simple tables question in php

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
dirgeshp
Forum Newbie
Posts: 23
Joined: Thu Jun 22, 2006 11:40 am

simple tables question in php

Post by dirgeshp »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


i am trying to make a 2 cells in a table using php

the problem is ... i have set the WIDTH and yet...the cell STILL keeps getting bigger...

is there a way to make it so the CELL does not get bigger and stays CONSTANT no matter what..


[syntax="html"]<table border="1" width="100%" id="table1">
	<tr>
		<td width="100">ddddddddddddddddddddddd</td>
		<td width="200">ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd</td>
	</tr>
</table>

feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Set the overflow style property.
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

That was my reaction too, but I've tested and it doesn't seem to work on the TD elements.

EDIT: It does work on DIV elements, so a solution might be to put a DIV item inside the TD item, and set the overflow on that.
Last edited by GM on Fri Jul 07, 2006 12:02 pm, edited 1 time in total.
Dave Lohran
Forum Newbie
Posts: 4
Joined: Fri Jul 07, 2006 11:43 am

Post by Dave Lohran »

I believe you could surround it with a div, and use the overflow setting on that.
dirgeshp
Forum Newbie
Posts: 23
Joined: Thu Jun 22, 2006 11:40 am

Post by dirgeshp »

I am sorry .. but i tried that and it still doesn't work

i am testing on FIREFOX

any suggestions or point to examples please?
Dave Lohran
Forum Newbie
Posts: 4
Joined: Fri Jul 07, 2006 11:43 am

Post by Dave Lohran »

Every box object scales to fit the content inside of it. It looks like you're not using overflow correctly or something.
Would you please show us your code?
P.S. I don't think tables support overflow.
dirgeshp
Forum Newbie
Posts: 23
Joined: Thu Jun 22, 2006 11:40 am

Post by dirgeshp »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


[syntax="html"]<table border="1" width="10%" id="table1" height="50">
	<tr>
		<td style="width: 50px; border: 1px solid red;overflow:auto;">
		dddddddddddddddddddddddddddddddddddddddddddddddddddd</td>
	</tr>
</table>

feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


overflow doesn't work in TD elements. You need to do

[syntax="html"]<TD>
<DIV style="overflow: auto; width: 200px">
dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
</DIV>
</TD>
I've not tested, but it should do the trick.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
dirgeshp
Forum Newbie
Posts: 23
Joined: Thu Jun 22, 2006 11:40 am

Post by dirgeshp »

That doesn't work either....seems as though the CELL is getting wider and wider
Post Reply