SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    nowrap problem with Dreamwaver

    When i create a table i cant stop the column from streching when i enter text ......I want tables column to stay the same width and when it reaches the edge to start a new line instead of strechng my column and making it bigger.....I made sure the nowrap was NOT on but it still strechs my columns.......ive tried everything.....

    I could press enter to start a new line but i noticed other people dont have to do that .......plus it wouldnt be 100% even ....

    I even tried to rip off some code from some site and it worked fine , the columns wouldnt strech but as soon as i deleted the text and enterted my own it started streching again...

    Heres what im talking about......

    this is what its suppose to look like:



    but once i remove the text that was inside the column and put my own in its strech's like in the pic



    I typed the dfffffff where it sais tuesday


    im really frustrated....how can i overcome this ?

  2. #2
    SitePoint Enthusiast webchick's Avatar
    Join Date
    Jun 2004
    Location
    in front of a computer
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm. I don't personally know of a way around this apart from chopping the string length on the server-side prior to posting the text.

    For example:
    PHP Code:
    <?php

    $string 

    'testtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt';

    $string wordwrap($string30"<br />\n"1);

    echo 
    $string;

    ?>
    This would print:

    testtttttttttttttttttttttttttt
    tttttttttttttttttttttttttttttt
    tttttttttttttttttttttttttttttt
    tttttttttttttttttttttttttttttt
    tttttttttttttttttttttttttttttt
    tttttttttttttttttttttttttttttt
    tt

    As far as I'm aware, tables by their nature will auto-stretch to the minimum width of whatever's in them, even if you hard-code a width and specify a nowrap attribute.
    <?$a='496620796f752063616e2072656164207468697320796f7527726520'.
    '616c6d6f7374206173206269672061206765656b206173204920616d203b29'
    ;$b=explode("\n",chunk_split($a,2));$c='';for($i=0;$i<count($b)
    -1;$i++){$c.=chr(base_convert($b[$i],16,10));}echo nl2br($c);?>

  3. #3
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could try using the CSS property max-width, allthough I;m not sure that it is supported by Internet Explorer???
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  4. #4
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.ninjalove.com

    check out that website....how does that guy keep his entries so straight ?

  5. #5
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the solution, Greymatter

  6. #6
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stealthbox
    I found the solution, Greymatter
    What was it? apart from the grey matter :-)

    Spacing right?

    It may be a good idea to share your solution in case others have a similar problem and need an answer....

    Nadia


Bookmarks

Posting Permissions

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