Solved

Unable to correctly size table in Guestbook

Posted on 2001-06-14
11
442 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Zoom web page in asp.net 2 37
Summernote and form validation 10 47
Hand when hover boostrap carrousel 6 32
HTML button disabled 11 36
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

743 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

9 Experts available now in Live!

Get 1:1 Help Now