Table Fixing Problem

Discussion in 'HTML & Website Design' started by aami2007, Mar 12, 2007.

  1. #1
    I have made a table in an html page. I am encountering a problem that is that when I type any text without giving space between the characters (say a very long url of any site) in that table then it displays the whole text or url in one line forcing the width of table to increase than what I have initially set. I want that when text reaches the character limit that can adjust with in set width, it should automatically move to new line. Could you please help me in this regard.
     
    aami2007, Mar 12, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    That's not the way things work. You can do some server side scripting to count characters and insert a space where you want to break.

    I suggest you rethink the use of tables or your content. Why would you have long unbroken strings? Is your language Welsh?

    cheers,

    gary
     
    kk5st, Mar 12, 2007 IP
  3. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you have an example of the site?

    If your hyperlinks are too big for your table they might also be a bit... intimidating for your users. Maybe try this:

    <a href = "Long URL>Descriptive Text</a>
    Code (markup):
     
    rgchris, Mar 12, 2007 IP
  4. Rico777

    Rico777 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You mean:

    <a href = "Long URL">Descriptive Text</a>
     
    Rico777, Mar 12, 2007 IP
  5. ninjashoes

    ninjashoes Well-Known Member

    Messages:
    1,401
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    138
    #5
    this is what you want to do, its called anchor text and you can also make the link more persuasive by putting certain words in the text such as "free stuff click here" you get the idea

    btw what browser are you using?
     
    ninjashoes, Mar 12, 2007 IP
  6. aami2007

    aami2007 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanx every one for their opinion. I got solution of my problem from SEO Chat. And the solution is

    This is a quick fix solution but you can add the style WORD-BREAK:BREAK-ALL; to you table. Assuming you are using a Style sheet (SEO Friendly with the exception of using a table )... otherwise just add style="WORD-BREAK:BREAK-ALL;" to your table tag (Not very SEO friendly).


    And you know what, it worked fine for me. Any how! Thank you for your time.
     
    aami2007, Mar 13, 2007 IP
  7. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yeah, I missed a quotation mark.
     
    rgchris, Mar 13, 2007 IP
  8. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #8
    The word-break property is not a part of css. It is a proprietary IE property. How many browsers does it work in?

    cheers,

    gary
     
    kk5st, Mar 13, 2007 IP
  9. edy

    edy Peon

    Messages:
    256
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You don't have to break the line, instead you can set table or cell 'word wrap" property to true. Then it will wraps the line automatically.
     
    edy, Mar 13, 2007 IP