View Full Version : Simple Question!

06-30-2005, 05:46 PM
I posted this in the html/css forum, but no one seems to know how to fix it.
so i thought maybe this can't be done with just html,
just a simple question though.

how to i stop text from expanding a <table's> width?

example if someone was to type something like this:


it would make my table expand to, say 400, insted of the 200 I had specified as the table width.

how can this be stopped??

thanks in advance for your time!

06-30-2005, 05:54 PM
Could you use the css "overflow: auto;" style declaration so that if the element is wider than the container it's inserted into a scrollable area? Not a php solution, I know, but if it's acceptable it could save you some work.

06-30-2005, 05:59 PM
hmm, maybe, i'm not sure that would look right on the site though.

i really thought this would be a simple..lol,, i guess they never are.


06-30-2005, 06:10 PM
hmm, i thought i'd atleast try that, but it doesn't seem to work for me,,


auto {
overflow: auto;

<div class="test">testing</div>

06-30-2005, 06:27 PM
you shouldn't use it as you have it.
Instead, either assign it an id, or a multiple class if nessessary:

.auto { overflow: auto;}

.test { width: 10px;}

<div class="test auto">Overflow me</div>

You can clip this using php is you want, but I'd say its not nessessary.
Personally, if I were to use straight css, I'd probably use something to clip it off instead. But its all a matter of preference.