Solved

Unable to correctly size table in Guestbook

Posted on 2001-06-14
11
448 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
  • 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:RQuadling
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:RQuadling
ID: 6191704
Ha!

Even EE does the same thing!
0
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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:RQuadling
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:RQuadling
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

939 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

Need Help in Real-Time?

Connect with top rated Experts

3 Experts available now in Live!

Get 1:1 Help Now