473,560 Members | 2,918 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fundamental problem with HTML, or am I missing something?

When you have a long string like
aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaa
in an html table, it pushes the table out so you have to scroll to the
right. I've tried width=100%, width=500, both in the <td> and in
<table>, have tried all the stylesheet suggestions I've found in
google and it doesnt work. Ideally I'd rather have the text
force-wrapped, else just hidden than breaking the whole page's table.

Heres the site: www.hazara.org/guestbook.php

Sure I can remove the entries or use php to wrap the strings, I'd
rather use HTML+CSS for the sake of correctness. I've tried firefox
1.0, IE6.0, Mozilla, Netscape 7.2, Opera 7.x, Konquerer.
Jul 23 '05 #1
5 5161
Previously in comp.infosystem s.www.authoring.html, Ghazan Haider
<gh***********@ gmail.com> said:
When you have a long string like
aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaa
in an html table, it pushes the table out so you have to scroll to the
right.
Yes. This is normal and expected. My newsreader does the same thing with
long lines of text.
Ideally I'd rather have the text
force-wrapped, else just hidden than breaking the whole page's table.
Wrapping the text randomly could change the meaning. And whether the
text is too long or not in the first place depends on several factors,
including canvas width and font size.
Sure I can remove the entries or use php to wrap the strings,
Indeed.
I'd
rather use HTML+CSS for the sake of correctness.


Problem is, neither HTML or CSS can do what you want. HTML simply
describes the structure of the content. It doesn't change the content
itself. CSS merely suggests a presentation for the content.

Trying to use HTML or CSS for something they are not designed for, for
the sake of correctness, is worse than pointless.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #2
gh***********@g mail.com (Ghazan Haider) wrote:
When you have a long string like
aaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaa
in an html table, it pushes the table out so you have to scroll to the
right.
Yes. This is the correct behaviour as per the HTML and CSS specs. Any
widths given to tables or table cells are suggestions and can be
ignored by browsers in order to fully display the content. After all
the content of a table is more important than a presentation
suggestions.
I've tried width=100%, width=500, both in the <td> and in
<table>, have tried all the stylesheet suggestions I've found in
google and it doesnt work. Ideally I'd rather have the text
force-wrapped, else just hidden than breaking the whole page's table.
No way to "force wrap" it without inserting either <br> elements or
permitted line break characters (such as a space) into the text.

If you want the text hidden then overflow: hidden for the <td> should
do the trick. But if you're hiding the content you might as well
delete it.
Heres the site: www.hazara.org/guestbook.php
I don't see any need to use a table at all for that page, except
possibly for the form.
Sure I can remove the entries or use php to wrap the strings, I'd
rather use HTML+CSS for the sake of correctness.


Using a programming language to programmaticall y edit the content so
that it suits your requirements is the correct way to go.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 23 '05 #3
gh***********@g mail.com (Ghazan Haider) wrote:
When you have a long string like
aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaaaaa aaaaaaaaaaaaa in an html table, it pushes the table out
so you have to scroll to the right.
Then don't put such a string into your table. I can understand why people
write "aaaaaaargh !", but so many a's in succession really don't make sense,
or even an impression.

And don't let others put such strings into your page either.
Heres the site: www.hazara.org/guestbook.php


Guestbooks are a constant source of confusion and problems, especially when
implemented using defective software and without adequate control
arrangements. Don't expect HTML to solve such problems.

Make the guestbook software reject or truncate or otherwise handle "words"
that exceed a reasonable limit, say 42 characters. Include a note about
this into the usage instructions.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #4
Jukka K. Korpela was zeer hard aan het denken :
gh***********@g mail.com (Ghazan Haider) wrote:
When you have a long string like
aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaaaaa aaaaaaaaaaaaa in an html table, it pushes the table out
so you have to scroll to the right.
Then don't put such a string into your table. I can understand why people
write "aaaaaaargh !", but so many a's in succession really don't make sense,
or even an impression.

And don't let others put such strings into your page either.


Indeed.
Heres the site: www.hazara.org/guestbook.php


Guestbooks are a constant source of confusion and problems, especially when
implemented using defective software and without adequate control
arrangements. Don't expect HTML to solve such problems.


Couldn't agree more.
Make the guestbook software reject or truncate or otherwise handle "words"
that exceed a reasonable limit, say 42 characters. Include a note about
this into the usage instructions.


I don't think it would be a good idea to software reject or truncate
strings that exceed a 'reasonable limit'. What's reasonable anyway?

This could have various annoying side-effects (think about
programming-code expressions longer than 42 characters; or for the sake
of amusement, consider an inhabitant of
Llanfairpwllgwy ngyllgogerychwy rndrobwllllanty siliogogogoch to post his
town name ;-))

My approach to the wrapping-problem has been not to force a thing
lay-out-wise, and to put possibly long content in a overflow:scroll
styled block level element.

The key to this however seems to be human revision of the texts. Only a
human can decide on how wrapping could change the meaning of the text.

just my ¤.02

Vincent

--
Dit is een automatische handtekening van MesNews.
Site : http://mesnews.no-ip.com

Jul 23 '05 #5
Vincent De Baere <vd******@lilly .csoft.net> wrote:
Make the guestbook software reject or truncate or otherwise handle
"words" that exceed a reasonable limit, say 42 characters. Include a
note about this into the usage instructions.
I don't think it would be a good idea to software reject or truncate
strings that exceed a 'reasonable limit'. What's reasonable anyway?


Whatever the guestbook maintainer finds reasonable. It's his forum, he
tells the rules, and a good host tells the rules to the guest before or at
least upon entry. Just as he can forbid talk about sex or religion, he can
impose technical limitations - which would often be easier to understand
and accept.
This could have various annoying side-effects (think about
programming-code expressions longer than 42 characters; or for the sake
of amusement, consider an inhabitant of
Llanfairpwllgwy ngyllgogerychwy rndrobwllllanty siliogogogoch to post his
town name ;-))
If you set up a guestbook, you can decide whether such postings will be
allowed, or set rules on handling them. Actually I think you _should_,
given that the postings will appear as part of an HTML page, where such
oddities can cause confusion. In many guestbook designs, they may disturb
other people's postings as well (by changing the page's overall appearance,
perhaps even the width of the page as a whole).

There are many ways to handle too long strings. An interesting idea just
came into my mind:
<span title="Llanfair pwllgwyngyllgog erychwyrndrobwl lllantysiliogog ogoch">
Llanfair…</span>
(It would be more logical to use <abbr> instead, but we know IE.)

Of course, such handling (or any handling) needs to be done in the server-
side software that runs the guestbook.
My approach to the wrapping-problem has been not to force a thing
lay-out-wise, and to put possibly long content in a overflow:scroll
styled block level element.


If you decide to do so, I think the handling (in a guestbook) should be
made on a per-contribution basis. Each contribution should be a <div>
element, with width: 100% and overflow: auto, so that if it contains too
long lines, only that contribution needs horizontal scrolling.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2654
by: Steve | last post by:
I want to learn PHP. To date all I've used is Frontpage. What is the first step? Should I move to Dreamweaver or something else, then get into PHP? Thanks, Steve
51
4243
by: Casper Bang | last post by:
My question is fundamental I beleive but it has been teasing me for a while: I have two classes in my app. The first class is instantiated as a member of my second class. Within this first class, a method (event) needs to be able to invoke methods of the second class. With static classes its possible but this is not desirable. There's...
3
1500
by: Kyle Kolander | last post by:
I recently looked over the faq item relating to fundamental type sizes: http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.5 and was a bit surprised, as I had been taught more-or-less the same thing, just not the minimum gaurantees for short and long. "C++ guarantees a char is exactly one byte which is at least 8 bits, short is at...
8
1792
by: Kyle Kolander | last post by:
Sorry, I sent this to comp.std.c++ and meant to send it here as well... Why are the minimum size guarantees for fundamental types intentionally omitted from section 3.9.1 Fundamental types of the C++ standard? If indeed these guarantees can be inferred from other parts of the standard, and it is the intent of the standards committee that...
1
1229
by: JohnK | last post by:
I have a GridView MyClass List = new MyClass ; for (int i = 0; i < 10; i++) { List = new MyClass(); List.FirstName = " First " + i; List.LastName = " Last " + i; }
23
5893
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine on most machines, on some machines I experience this problem: When loading the page a window pops up that asks if I want to open the document...
16
3476
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate...
5
13323
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg instead of http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg As u see, there's the...
0
7632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7552
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8066
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7596
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7920
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6191
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3605
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1169
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.