Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14

Thread: fixed size cell

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    fixed size cell

    how to make the size of the table fixed, i mean when the data which will be filled into the cell has many charachters without new lines, so the table width will be enlarg as text width, so the design of the page will fail, how to limit anumber of charachters in each line to keep the table width?

    my data get from my database and my table width is 75%
    Last edited by ahmedsoliman; 01-08-2003 at 05:07 PM.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That will not work in all & old browsers, but...

    <td style="word-wrap: break-word;">
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it dosen't work, i am using IE6,and what the old method to make it work, just lilke this forum how they do it when i keep my finger on the zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzz button

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is it difficult?

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the case of this forum, the text is probably parsed so that line breaks are automatically inserted every x characters, probably qualified slightly to prevent words being split.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    then it will done with server side script like asp , before inserting in DB i will insert breaks in the paragraph, and no solution for it by html or css,is it right??

    this error found in this forum at this thread:

    CDONTS: Send mail to address from field
    Last edited by ahmedsoliman; 01-10-2003 at 03:47 AM.

  • #7
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,059
    Thanks
    0
    Thanked 13 Times in 13 Posts
    So that I understand what it is you are asking... What you want is so that your table will stay the same width but allow for text to break naturally???
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes exactly

  • #9
    Super Moderator sage45's Avatar
    Join Date
    May 2002
    Posts
    1,059
    Thanks
    0
    Thanked 13 Times in 13 Posts
    This is actually simple... Set a fixed width to your table data cell...

    Say your table width is 75%

    Code:
    <TABLE WIDTH="75%">
    What you can do then is this
    Code:
       <TR>
          <TD WIDTH="15%">stuff</TD>
          <TD WIDTH="85%">stuff</TD>
       </TR>
    </TABLE>
    or you can use specific widths (pixels ofcourse)

    Code:
       <TR>
          <TD WIDTH="40">stuff</TD>
          <TD WIDTH="60">stuff</TD>
       </TR>
    </TABLE>
    So your Table itself, will take 75% of the page width, then your table objects (unless they are unbreakable) will take only the set size's they are allowed (more specifically by setting pixels as you are not allowing for percentages)


    Now, when I said as long as the table object is unbreakable, I mean images or polled data... Really it depends on what you are placing into the table and how you are putting it there... Perhaps some code would be helpful...

    -sage-
    Last edited by sage45; 01-10-2003 at 06:59 PM.
    HTML & CSS Forum Moderator

    "If you don't know what you think you know, then what do you know."
    R.I.P. Derrick Thomas #58
    1/1/1967 - 2/8/2000

  • #10
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by sage45
    unless they are unbreakable
    ehem.. the thread is about putting unbreakable objects in a cell without enlarging it
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    to sage,it dosen't work, i am talking about inserting text not images.

    this my test page:
    http://www.geocities.com/af_soliman/test1.html
    Last edited by ahmedsoliman; 01-10-2003 at 10:35 PM.

  • #12
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Ahmed,

    As stated above, the only way I can think of to do this is to "manually" insert a line break every so many characters in your string...

    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #13
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I see the problem.

    break-word seems to work only with fixed cell widths, so
    <td width=300 style="word-wrap: break-word;">
    will break the words, but
    <td width=75% style="word-wrap: break-word;">
    not
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #14
    Regular Coder
    Join Date
    Jun 2002
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you borgtex, it works.
    thanks for all.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •