473,698 Members | 2,426 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 5177
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
2666
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
4277
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 obviouly some visibility problem I am not familiar with. It is not a parent-child relationship since...
3
1504
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 least 16 bits, int is at least 16 bits, and long is at least 32 bits." I looked in Stroustrup's...
8
1799
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 these guarantees exist, then why are they not listed in the most relevant section? I've been...
1
1232
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
5923
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 show_page.asp. When I click "Open" Interdev pops up and opens up a
16
3501
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 (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
5
13363
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 website URL before the image URL.
0
8675
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8897
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8862
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.