Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    Hi i'm real dumb I know but heres the problem.
    Right check this,

    http://xidos.servehttp.com/users/gsheep/index.html

    thats the way its supposed to look and the client is just supposed to be able to add in text between the <p></p> tags. Works for me but occasionally it'll all go like this

    http://xidos.servehttp.com/users/gsheep/index4.html

    Can someone put an end to this inability of mine to fix the table cell widths and show me a practical example? This is a really big problem of mine as clients always want to update their pages and rightfully so, but this happens! So could someone actually fix this page so I can see a practical example at work on a page I know.

    Cheers
    Tha_Gsheep
    www.appletv.co.uk

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    There's nothing you can do client-side. Server-side you can use http://www.php.net/wordwrap with a custom char limit to make sure it doesn't get too excessive.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Welcome to the board, Tha_Gsheep !

    What you can do if you like is change the code here:

    <TD COLSPAN=6 ROWSPAN=2 valign="top" background="images/colour2.gif">

    to include the width e.g.

    <TD COLSPAN=6 ROWSPAN=2 width="(width in pixels)" valign="top" background="images/colour2.gif">

    It should keep your width to a certain level. However, if a single word/unspaced phrase is wider than the width of the cell, you're gonna have that problem no matter what.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    so theres no way then? Not even if I set the image width on both sides of the cell? I just want the overflow to go down onto the next line like a word wrap. I can do this in php or in css but I have not a clue if its even possible otherwise. Thanks alot anyways

    Tha_Gsheep
    www.appletv.co.uk

  6. #5
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    Its definitely the

    put .................................................. .................................................. ...........................

    line. HTML states that the width declarations are simply for the direction of the server and WILL be ignored if the text is too long. You'll simply have to limit the number of characters between two breakable space points
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  7. #6
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    You can even see here in DerFarm's post above how the content part extends the size of the table.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  8. #7
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Assuming the user submits the updated content via a browser, you can always perform a validation check by splitting the string at the spaces and seeing if each word is too long. That's about the only thing I can think of.

    If you want to see an example of how I got around it for a client, go here:

    http://www.adamwebdesign.ca/lrs/searchbox2.htm

    Type an "e" into the search blank and then click "submit".

    As you can see, the first two listings fit but the third is too long. So I just trimmed it and used ... to display the result. You can do something similar for what you're doing.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  9. #8
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    I've posted this query on like 6 forums now and have never recieved as good an explanation as that. That is by far the best work around.

    The user does not sumit the data by a browser I ask them to paste it between <!-- start--> and <!-- end --> but if your were to show me how to do it your way I would surely be converted.

    Please please please if its not too much too ask can you go into detail what exactly you were doing every step of the way and how I would achieve the same thing on my web page as this is invaluable knowledge your providing me with. I'm a web designer and this is constantly tripping me up when clients are just copying and pasting code between the <p></p> tags and if you were to explain this to me this would never happen again I would become a better designer for it.
    Thanks a lot TheGame and well done!

    Tha_Gsheep
    www.appletv.co.uk

  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Okay, I'll do it, but my solution will be an ASP-based one (I don't know PHP or any other programming language yet so you may have to adapt your code to make it work.)

    Step 1: User inputs his/her web code into a textarea (or input box) and hits "Submit" to get the code included.

    Step 2: Script takes the form request, processes it and outputs it. I've included a code snippet, but it will need to be modified for things such as paragraphs, line breaks, and other HTML code:
    Code:
    ' Clear New_Text
    New_Text = ""
    Old_Text = Trim (Request.Form (Your old text))
    Old_Text = Split (Old_Text, " ")
    for j = 0 to UBound (Old_Text)
    	Word_Length = Len (Old_Text (j))
    ' Is the current word too long?  If it is, trim the current word, add "..." and exit loop.
                 	if Word_Length > 15 then
    		Old_Text (j) = Left (Old_Text (j), 12) & "..."
    	end if
    	New_Text = New_Text & " " & Old_Text (j)
    	if Word_Length > 15 then
    			exit for
    	end if
    Next
    Response.Write New_Text
    In other words, take the code itself, trim any long strings, and have it outputted (of course, you can replace the truncated output with an error message indicating that the code won't fit or something like that, but this is entirely up to you.)
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  11. #10
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    PHP:
    PHP Code:
    echo wordwrap($text); 
    LOL, just one line
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:12 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com