473,799 Members | 3,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alignment to char and other things

[My first post from Google Groups. Hope it's readable.]

I'm working with some semi-advanced tables with lots of decimal
numbers in, and I can't get the alignment to work.

http://www.algonet.se/~gustafl/temp/output_ib.html

I want numbers aligned to the decimal point. The HTML 4 spec says User
agents doesn't need to support 'char' and 'charoff', so I wonder if
the problem is lack of support? If so, can the same results be
achieved in another way?

Next best would be aligning the number to right, but there seem to be
a problem with support for <colgroup> aswell. Am I right? Best
solution I found was to have a class for right alignment and call it
from each <td>.

Also, can someone give me a way to prevent negative numbers to break
after the minus? A solution that adds the least clutter to the code?
Would it be right typographically to replace the minus with an
'endash' (#x2013;)?

Thanks,

Gustaf
Jul 20 '05
30 3526
Andreas Prilop wrote in
<Pine.GSO.4.44. 0405271455430.5 348-100000@s5b003>
On 27 May 2004, Philipp Lenssen wrote:
How about a zero (0) in the same colour as the background? It does
not much harm when displayed black-on-white.

A shrewd idea.


And one that might get you banned in search engines.


Have you got any evidence?


Google certainly takes exception to text that's hidden by making it the same
colour as the background. However, there is some doubt as to whether this is
currently detectable by Google during the indexing of the site - if it's
reported as spam, then someone from Google would look at the site and, since
the implementation suggested above is patently not spam, I would have
thought that there should be no problem.

Never-the-less, as a general principle I'd avoid such methods if possible. I
wouldn't want to find that Google had found a way to automatically check for
same-colour text and had de-listed my site because it had discovered some on
my site. The Googlebot is probably less understanding than a Google human.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

Jul 20 '05 #21
"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote in
comp.infosystem s.www.authoring.html:
Andreas Prilop <nh******@rrz n-user.uni-hannover.de> wrote:
But the space, or the no-break space, does not usually have the same
width as digits, as you say. Using a monospace font solves this
problem but results in a really poor, computerish look.


How about a zero (0) in the same colour as the background? It does
not much harm when displayed black-on-white.


A shrewd idea.
There's the risk that people start wondering what's wrong when they see
zeroes or blank depending on the browser and its mode.
For example, they see 123.45 on screen but 123.4500 on paper, maybe with
the digits 00 in gray.


I think there's a bigger problem: 123.45 and 123.4500 are not the
same number. 123.45 connotes accuracy to the nearest 0.01 (one part
in ten thousand, here), but 123.4500 connotes accuracy to the
nearest 0.0001 (one part in a million).

If CSS is supposed to be about presentation (as I think we all
agree), then putting in those zeroes as _content_ is not really
correct. They could be done as CSS with ":after", but support is
poor.

The only 100%-supported solution I can see is to use <pre> for the
table of numbers and supply the necessary blanks as &nbsp;.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #22
On Thu, 27 May 2004 14:59:47 +0200, Andreas Prilop
<nh******@rrz n-user.uni-hannover.de> wrote:
On 27 May 2004, Philipp Lenssen wrote:
How about a zero (0) in the same colour as the background? It does
not much harm when displayed black-on-white.

A shrewd idea.


And one that might get you banned in search engines.


Have you got any evidence?

From:

<http://www.google.com/webmasters/2.html>

<quote>
B. My web pages used to be listed and now they aren't.
.. . . .
3. Other reasons

If your page does not appear at all, here are some other possible
explanations.

.. . .

Your page was manually removed from our index, because it did not
conform with the quality standards necessary to assign accurate
PageRank. We will not comment on the individual reasons a page was
removed and we do not offer an exhaustive list of practices that can
cause removal. However, certain actions such as cloaking, writing text
that can be seen by search engines but not by users...
</quote>

However, although I can se how they can tell if you have hidden text
by using the <font> element, I haven't sen any requests in my logs
(last time I looked) for a style sheet by the googlebot.

Nick

--
Nick Theodorakis
ni************* *@hotmail.com
nicholas_theodo rakis [at] urmc [dot] rochester [dot] edu
Jul 20 '05 #23
On Fri, 28 May 2004 02:53:13 GMT, ni************* *@hotmail.com (Nick
Theodorakis) wrote:

[...How about a zero (0) in the same color as the background?...]
[...one that might get you banned in search engines...]
[...Have you got any evidence?...]
"Your page was manually removed from our index,
because it did not conform with the quality
standards necessary to assign accurate PageRank." However, although I can se how they can tell if you have hidden text
by using the <font> element, I haven't sen any requests in my logs
(last time I looked) for a style sheet by the googlebot.


And you would not find such a request from any other search engine
either. Indexers treats "optional information", like CSS, for just
what it is, i.e. "optional".

Think about it; millions after millions of www pages to scan and
evaluate, how much extra processing power would it take for an indexer
to also start looking at presentational suggestions, combine those
with marked up content, and then try to judge how the combination
_may_look_ on the user side?

What "pisses me off" when it comes to indexing bots is that most of
them "through's in the towel" if they find a site that has its content
presented in two or more languages at the same time.

I do have a (not quite finished) site that Google lets me find _only_
if I do a search for _exact_ words and word-sequences that are
available on my _main_page_.

The available pages that makes for the site has been up and mostly
stable for months now but still I can not search for fragments of my
sub pages content and get a hit.

As I see it; Google does not like Swedish and English mixed into one
and the same set of documents.

--
Rex

Jul 20 '05 #24
Andreas Prilop <nh******@rrz n-user.uni-hannover.de> wrote:
The question was about right-aligning of numbers, therefore writing

00123
01234
12345

for example.


I guess we have been discussing different alignment issues. I don't see
much problem in right-aligning integers - the only question is whether
you use HTML (align="right") or CSS (text-align: right) and exactly how -
we would normally want to right-align entire columns, but there are
different problems involved in it.

Right-aligning numbers with a decimal point, "aligning to a character"
(as indicated in the Subject line) is much more difficult, and applying
your suggestion of 0's hidden with CSS looks like best shot so far.

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

Jul 20 '05 #25
Under Subject: Re: Alignment to char and other things
Jan Roland Eriksson <jr****@newsguy .com> wrote:
What "pisses me off" when it comes to indexing bots is that most of
them "through's in the towel" if they find a site that has its
content presented in two or more languages at the same time. - - As I see it; Google does not like Swedish and English mixed into one
and the same set of documents.


I wonder why Google would do so. It surely _can_ do so, since it has
some (presumably simplistic) "heuristics " for guessing the content
language, probably still ignoring all protocol-correct ways of
announcing the language (maybe reasonably in practice, since I'm afraid
there are many pages with lang attributes provided by an authoring tool
by default, without paying the slightest attention to the actual
content language).

Maybe it just thinks that (what it sees as) language mixing is a
symptom of some attempt to fool search engines. We know that people
often put <meta> keywords in different languages not appearing in the
content, and this might (arguably) be regarded as a form of spamdexing.
And people might try the same by using various hiding techniques, e.g.
by putting the foreign language stuff as white on white text. (When you
do it in CSS, Google probably won't detect it, as discussed in this
thread.)

_Or_ bilingualism might just switch off some of the processing that
Google would otherwise do for the page. If it uses some techniques that
are somehow related to content language (for example, idealistically
speaking, techniques for reducing all inclined words to their base form
for indexing), it might simply not use them for a page that does not
seem to be in one particular language.

On the other hand, most bilingual pages are results of suboptimal
design. It's often a lazy man's solution to put two languages on one
page instead of creating two interlinked pages.

Consider, for example, a city where both Finnish and Swedish are
official languages. Should it create a bilingual site? Just as printed
material is often bilingual? (This puzzles me, but maybe it _is_
cheaper than printing two versions and taking care of the problem of
sending everyone the version he prefers.) I would say emphatically
"no". _People_ need not be bilingual, and even if they are, they
normally prefer reading in one of the languages. Bilingual pages waste
space and confuse people. (It is occasionally useful for a user to read
both versions, especially if neither of the languages is his native
language or if he knows both fairly well but does not understand a
particular wording. But links will let people access the other version
in such cases.)

But, of course, there are exceptions, such as bilingual dictionaries
and studies that present different language versions of a text for
critical or other purposes.

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

Jul 20 '05 #26
Stan Brown <th************ @fastmail.fm> wrote:
I think there's a bigger problem: 123.45 and 123.4500 are not the
same number.
Actually, they are. They are two different numerals for exactly the same
number. OK, this is nitpicking, since I do get your point:
123.45 connotes accuracy to the nearest 0.01 (one part
in ten thousand, here), but 123.4500 connotes accuracy to the
nearest 0.0001 (one part in a million).
This relates to the _practical meaning_ assigned to the numeral.
Since so many people say that trailing zeroes connote accuracy (I have
had interesting discussions on this in misc.metric-system), we need to
admit that they actually do - for some people at least. But such
conclusions are drawn at everyone's own risk. Similarly, if I say that
something is 800 mm wide, it is everyone's own choice to deduce that I
make the claim of being accurate to 0.5 millimeter (since I did not write
80 cm or 8 dm or 0.8 m). The only accuracy information that one has the
right to make the author responsible for is the information that has been
explicitly specified by the author, e.g. by writing
800 mm &plusmn; 0.4 mm
(Note that real accuracies in measurements and estimates would seldom be
describably in any reasonable accuracy by using just the idea that
trailing zeroes mattter.)
If CSS is supposed to be about presentation (as I think we all
agree), then putting in those zeroes as _content_ is not really
correct. They could be done as CSS with ":after", but support is
poor.
The difference between 123.45 and 123.4500 is in the presentation, not in
the number denoted. We probably disagree on the impact on connotations,
though I think we agree on the observation that the strength of
connotations depends on the context. If all numbers in a column of a
table have exactly four digits to the right of the decimal point, it is a
fair assumption that they are used for justification, so that trailing
zeroes might not connote accuracy. If I use an isolated 123.4500 in
prose, I admit that most people would probably think that I meant to
express greater accuracy than by 123.450 or 123.45.
The only 100%-supported solution I can see is to use <pre> for the
table of numbers and supply the necessary blanks as &nbsp;


I don't think we need <pre> for that, and if we use <pre>, we surely
don't need &nbsp;. If monospace fonts are acceptable, it is sufficient to
use <tt> and &nbsp;. Of course using CSS (e.g.,
td { font-family: Courier New, monospace }) is much simpler than using
<tt> in each cell, but the <tt> works when CSS is off, too.

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

Jul 20 '05 #27
Jan Roland Eriksson wrote:
What "pisses me off" when it comes to indexing bots is that most of
them "through's in the towel" if they find a site that has its content
presented in two or more languages at the same time.
I used to have a small personal site on a university account whose
home page had text in two languages, and it showed up quite high in
Google, on the first page after several domains all used by one
individual. (insert minor grumble about domain selfishness here)
I do have a (not quite finished) site that Google lets me find _only_
if I do a search for _exact_ words and word-sequences that are
available on my _main_page_.

The available pages that makes for the site has been up and mostly
stable for months now but still I can not search for fragments of my
sub pages content and get a hit.


It seems that Google is slower than it used to be. It took me months
to get a restaurant's new site at the top of Google for a search of
the restaurant's name. It was not a question of getting indexed;
Googlebot had crawled the site. But Google was convinced that other
sites with very little relevant content should be higher. Eventually,
it caught up, and the new site is rated where I think it ought to be.

It may be a question of patience.

--
Brian (remove ".invalid" to email me)

Jul 20 '05 #28
"Jukka K. Korpela" <jk******@cs.tu t.fi> wrote in
news:Xn******** *************** ******@193.229. 0.31:
As I see it; Google does not like Swedish and English mixed into one
and the same set of documents.

If you do a Google search of www.confluence.org using the terms
swedish english, you will find this page:
http://www.confluence.org/confluence.php?visitid=8092
On the other hand, most bilingual pages are results of suboptimal
design. It's often a lazy man's solution to put two languages on one
page instead of creating two interlinked pages. But, of course, there are exceptions, such as bilingual dictionaries
and studies that present different language versions of a text for
critical or other purposes.


When we have multiple language versions of a confluence visit
narrative, we present them in the same page. In part this is
done for 'historical reasons', due to the design of the
database and codebase. And we know there are issues with how
the confluence.php page is designed. Other than such issues,
do you(collectivel y) see it as a "problem" that we sometimes
have two(or more) versions of the narrative text on one page?

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 20 '05 #29
Dave Patton <no**@none.co m> wrote:
When we have multiple language versions of a confluence visit
narrative, we present them in the same page. In part this is
done for 'historical reasons', due to the design of the
database and codebase.
It should be straightforward to modify the system so that two pages are
generated, with links to each other. But it might mean some hard work.
And we know there are issues with how
the confluence.php page is designed. Other than such issues,
do you(collectivel y) see it as a "problem" that we sometimes
have two(or more) versions of the narrative text on one page?


I'm not sure I see what you see as the design issue. But if I read the
English text on the page, I won't see the pictures at the start. The
Swedish text eats up space and prevents natural layout. Moreover, if I
didn't know Swedish, I might get a bit disturbed. Think about a page
containing first some text that is completely incomprehensibl e to you, or
just comprehensible enough to irritate you to ask what it is, or maybe
text in unknown characters.

Besides, the navigation (and some other essential parts) is in English
only. What would I do if I only knew Swedish? (If all the rest on the
site is in English only, it would still be useful to a Swedish-only
person who found the page via Google to know what the situation is, maybe
via a short note in Swedish about the site.)

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

Jul 20 '05 #30

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

Similar topics

36
7791
by: Bhalchandra Thatte | last post by:
I am allocating a block of memory using malloc. I want to use it to store a "header" structure followed by structs in my application. How to calculate the alignment without making any assumption about the most restrictive type on my machine? Thanks.
10
3243
by: j0mbolar | last post by:
for any pointer to T, does a pointer to T have different or can have different alignment requirement than a pointer to pointer to T? if so, where is the exact wording in the standard that would suggest so?
67
10762
by: S.Tobias | last post by:
I would like to check if I understand the following excerpt correctly: 6.2.5#26 (Types): All pointers to structure types shall have the same representation and alignment requirements as each other. All pointers to union types shall have the same representation and alignment requirements as each other. Does it mean that *all* structure (or union) types have the same alignment? Eg. type
13
2999
by: aegis | last post by:
The following was mentioned by Eric Sosman from http://groups.google.com/group/comp.lang.c/msg/b696b28f59b9dac4?dmode=source "The alignment requirement for any type T must be a divisor of sizeof(T). (Proof: In `T array;' both `array' and `array' must be correctly aligned.) Since `sizeof(unsigned char)' is divisible only by one and since one is a divisor of every type's size, every type is suitably aligned for `unsigned char'."
3
2504
by: Bill Pursell | last post by:
I have a program that does most of its work traversing a bunch of lists. The lists contain a void *, and I spent some time today replacing the void *'s with a copy of the data at the end of the structure as a zero length array. The performance improvement that resulted by avoiding the need to dereference the ptr was substantial, but it has left me with an uncertain feeling. In particular, changing an assignment caused the output to...
12
818
by: Yevgen Muntyan | last post by:
Hey, Consider the following code: #include <stdlib.h> #define MAGIC_NUMBER 64 void *my_malloc (size_t n) { char *result = malloc (n + MAGIC_NUMBER);
10
2214
by: haomiao | last post by:
I want to implement a common list that can cantain any type of data, so I declare the list as (briefly) --------------------------------------- struct list { int data_size; int node_num; char nodes; //will be list_node1,list_node2... };
11
2308
by: Brian Gladman | last post by:
A lot of low level cryptographic code and some hardware cryptographic accelerators either fail completely or perform very poorly if their input, output and/or key storage areas in memory are not aligned on specific memory boundaries. Moreover, in many situations the cryptographic code does not itself have control over the memory alignment of its parameters so the best it can do is to detect if these aligmments are correct and act...
1
4340
by: RazvanD | last post by:
Hi! I am trying to get the page-aligned address for an ordinary memory address. As I am using an x86-based CPU the page size is 4KB. Thus, assuming addr is the memory address, I could get the page-aligned address by using the following methods:
8
2831
by: Stephen Horne | last post by:
I understand that the next C++ standard will have features to handle the alignment of data types. This is good, but a bit late for me! I've been using some template trickery to handle alignment issues for some time. What I usually want is a type that takes the same amount of space and has the same alignment as some other type, but which doesn't have constructors, destructors etc. The idea is that initialisation and cleanup can be done...
0
9540
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
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
10250
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
10222
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
10026
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...
0
9068
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
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...
1
4139
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
2
3757
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.