/    Sign up×
Community /Pin to ProfileBookmark

TABLE fixed width -how to?

Hi guys,

I got a table and I insert information into it from a textarea (not important). My problem is that I specify the width =164 and also the width of the TD as 164. i also have put the nowrap tag in the TD.

However when info is entered into the table and its bigger than 164 wide it just expands the width instead of scrolling below onto the next line.

I have also tried to put the content in the TD into a DIV (with width of 164 ) but still no luck.

code:
<table width=”164″ border=”0″ class=”contentTableRight” >
<tr>
<td width=”164″ nowrap><h2>Latest Work</h2>
<div style=”width:164px”>
<?
if (isset($textHTML))
echo($textHTML);
?>
</div>
</td>
</tr>
</table>

PLEASE can someone advise me to as whats causing it to extend or what I can do to restrict it.

thanks in advance

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@deep_dhyaniOct 21.2005 — What text are you intserting into div tag?

There is no problem with the table.
Copy linkTweet thisAlerts:
@bebil2authorOct 21.2005 — its text from a rich text editor but even if I insert normal (plain) text but which is longer than the width it extends.... So I need to limit it so that it goes onto the next line.

thanks in advance
Copy linkTweet thisAlerts:
@deep_dhyaniOct 21.2005 — <html>

<body>

<table width="164" border="0">

<tr>

<td width="164">

<h2>Latest Work 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 1</h2>

Latest Work 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 1

<div style="width:164px">

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT

TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT

</div>

</td>

</tr>

</table>

</body>

</html>

above code working prefectly in ie. which browser are you using?
Copy linkTweet thisAlerts:
@bebil2authorOct 21.2005 — hi, sorry I was doing something very dumb,.... my test data was mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

or something to that effect so it treated it like 1 word and couldnt break it down so it could be put on a different line.

thanks alot for your help...much appreciated.
×

Success!

Help @bebil2 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...