Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Checking For Word Wrap In Table Column


2 replies to this topic

#1 afoongwl215

    Newbie

  • Kontributors
  • Pip
  • 3 posts

Posted 27 February 2010 - 04:06 AM

Hi, i have this problem currently.

Take for instance i have

<table width=20>text text</table>
text text

This will display fine whereas

<table width=20>text text text text text text text text</table>
text text text text
text text text textt

Will cause it to wrap to the next line.

What im doing currently us using javascript to detect he length of the text and appending a <marquee> tag before those that have exceeded the required length.

However, i realize that other things plays a part in determining if the word is wrapped for instance capital letter size is different from normal letters.

Is there a way for me to determine if a table column has been word warped using javascript?

#2 Baniboy

    Advocatus Diaboli

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 878 posts
  • Gender:Male
  • Location:/root
  • Interests:Everything...
  • myCENT:37.47

Posted 27 February 2010 - 12:05 PM

I don't know much about your problem or javascript, but it might be caused by quirks mode. A table element must contain table row and table cell elements by the W3 standards. So put in <tr> and <td> tags, try again and see if it works.

#3 afoongwl215

    Newbie

  • Kontributors
  • Pip
  • 3 posts

Posted 27 February 2010 - 12:34 PM

View PostBaniboy, on Feb 27 2010, 12:05 PM, said:

I don't know much about your problem or javascript, but it might be caused by quirks mode. A table element must contain table row and table cell elements by the W3 standards. So put in <tr> and <td> tags, try again and see if it works.


Hi, In my actual implementation all tables have Tr/td tags etc. the actual problem itself is the word wrap. therefore, im asking if there's a way to detect if an element is has been wordwraped.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users