Solved

Unable to correctly size table in Guestbook

Posted on 2001-06-14
11
514 Views
Last Modified: 2012-05-04
I'm having problems with the table settings on my guestbook for www.nsyncfanbus.com. The problem is the stretching of the table which contains the guestbook entries as they are created.

This morning, I tweaked the page width to 100% as suggested by the webserver support - to no avail.

Check-out the code on the page. Is there something I'm missing or need to take out.
0
Comment
Question by:DeanMarteen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6191520
I don't understand what the problem is.  The page looks fine to me.  What do you mean by stretching out?  What is stretching.

Cd&
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6191696
In the guestbook, you have an entry ...

<br><b>Name:</b> lindsay
<br><b>Email:</b> <a href="mailto:lindsayksj_1@hotmail.com"><i>lindsayksj_1@hotmail.com</i></a>
<br><b>Date:</b> Jun 1, 2001 05:49 PDT
<br><b>Location:</b> N6974 Lake Mills, WI
<br><br><b>Comments:</b>
<blockquote>
              I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(NO SUPRISE EVERYONE LOVES YOU)
</blockquote>
<hr noshade width="80%">



I took this one out and it was all OK.

I think it MAY have something to do with allocating too much space for the ! but not actually needing it.

Not sure why really!

Regards,

Richard.
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6191704
Ha!

Even EE does the same thing!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DeanMarteen
ID: 6192038
In response to COBALDinasour, the page that's spreading is the "Guestbook-View" or www.nsyncfanbus.com/data/guestbook.html
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 100 total points
ID: 6192649
RQuadling hit it.  You are using a textarea and some of your visitors are idiots who like to scrwe thinsgs up.  if there are no spaces or hyphens in a string the widthe of a textare will expand to accomodate it because it does not know where to break the line.

options:

1. manually remove comments from idiots, or at least edit them.

2. add some additional server sid scripting to insert spacing before the data is saved.

3. Do some client side scripting to count the number of characters without a space befor submitting

The option you wish you had; that does not exist: an attribute to limit the width of the texarea.  Opera 4.0 has a width attribute for textarea, but it still expands.

Cd&


0
 

Author Comment

by:DeanMarteen
ID: 6193006
Thanks COBALdinosaur. I'll delete tard-entries tonight to see if this will correct the width problems. I'll let you know if this fixes it.
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6194381
Can you try adding WRAP=PHYSICAL to the textarea within the guestbook and try adding something then?

This is from the HTMLReference Library.

The TEXTAREA element lets users enter more than one line of text.

Any text included up to the end element is used to initialise the field's value. This end element is always required even if the field is initially blank. When submitting a form, lines in a TEXTAREA should be terminated using CR/LF.

In a typical rendering, the ROWS and COLS attributes determine the visible dimension of the field in characters. The field is rendered in a fixed-width font. HTML user agents should allow text to extend beyond these limits by scrolling as needed.

The WRAP attribute can be used to specify how to handle word-wrapping display in text input areas in forms.

<TEXTAREA WRAP=OFF> -- the default setting - Wrapping doesn't happen. Lines are sent exactly as typed.
<TEXTAREA WRAP=VIRTUAL> -- The display word-wraps, but long lines are sent as one line without new-lines.
<TEXTAREA WRAP=PHYSICAL> -- The display word-wraps, and the text is transmitted at all wrap points.
NOTE : Internet Explorer (version 3.0), by default wraps text in a <TEXTAREA> box, while Internet Explorer 4.0 supports the WRAP attribute. Also, these values have changed in Netscape 4.0 and Internet Explorer 4.0 and above to WRAP="off|soft|hard" respectively.


I THINK you can have WRAP=PHYSICAL WRAP=HARD in the same tag. Not sure. If not, you will need to sniff the browser and see which one to use.

Regards,

Richard.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6194972
WRAP  is an interesting attribute.  It is not in the HTML standard but is supported by major browsers except Netscape 6.

However the HTML reference library is somewhat inaccurate as to how it is actually implemented:
"The documentation for Netscape 2.0 lists two interesting values for the WRAP attribute: PHYSICAL and VIRTUAL. It does appear to support these values after a strange fashion - they are both treated exactly the same way as SOFT (which is not Netscape's default value for this attribute.) Interesting to note also that BOTH Microsoft and Netscape have each listed PHYSICAL and VIRTUAL in one of their references, even though these values have never really worked. Values of SOFT and HARD HAVE worked for this attribute since Netscape version 2.0 and Internet Explorer 4.0. See http://home.netscape.com/assist/net_sites/new_html3_prop.html for the Netscape reference that lists VIRTUAL and PHYSICAL (Microsoft's reference listing VIRTUAL/PHYSICAL has since been taken down.)"

Source: www.blooberry.com

But regardless of how WRAP is used if there are no spaces in a long string it will not wrap.

Cd&
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 6195038
I thought that the hard wrapping would force the entered text to be sent in lines, even if not REALLY breaking at a space?

I think the answer is to chop up lines to a maximum length. I am surprised that there is not a hard wrap function SOMEWHERE!

Another option would be to simply remove multiple characters with a "..." sort of thing.

This would be OK for !!!!!!!!!!!!, but not for asdasdsdjdkkhdlkfhdkfhadfhdfkhfkhdfkldhfkldhsfksdhfksadfhslkdfhs!

How about, any word OVER 100 characters is simply truncated! I am pretty sure that there is no word with 100 characters in it!!!!

Unlessyoutakeverystrangedrugswhichmakeyoutypeveryveryfastandallyourwordsjumbleintooneandanywayyouareprobablymoreinterestedinmunchiesorthespacebaronthekeyboardisbrokenandyoudidntturnthemonitoronbecauseyouaresocool!

Not!

<grin>

Richard.
0
 

Author Comment

by:DeanMarteen
ID: 6195496
A big THANK YOU COBOLdinosaur for your help in this matter. Early this morning I edited all entries where the person had put multiple digits together without spaces - and it worked! Even though there is no good way to do this automatically, its still a great solution. Hopefully in the next few years HTML will evolve to a state where it can recognize these entry problems and adjust for them. Until then I'll count on people like you for help. Thanks again.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6195561
Glad we could help.  Thanks for the A.:^)

Cd&
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: blockā€¦
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question