473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Alignment of a result field

My field result is " Total Operating Revenue", which has spaces
before the words.

But, when I use the following html to display, I don't see the spaces.
Why? Thanks.

<td align="Justify" bgcolor="#FFFF99"><Font
class=content4><%=ars.Fields("line_item_nm")%></font></td>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
4 1071
Because HTML ignores white space. You can use replace(str, " ", "&nbsp;")
or <PRE></PRE> maybe.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"eddie wang" <ew***@kmg.com> wrote in message
news:up**************@tk2msftngp13.phx.gbl...
My field result is " Total Operating Revenue", which has spaces
before the words.

But, when I use the following html to display, I don't see the spaces.
Why? Thanks.

<td align="Justify" bgcolor="#FFFF99"><Font
class=content4><%=ars.Fields("line_item_nm")%></font></td>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
html issue --

change the spaces to &nbsp; if you want them all to show up -- most browsers
will only display one space in any given string of spaces. Personally I
would set the table justification differently

"eddie wang" <ew***@kmg.com> wrote in message
news:up**************@tk2msftngp13.phx.gbl...
My field result is " Total Operating Revenue", which has spaces
before the words.

But, when I use the following html to display, I don't see the spaces.
Why? Thanks.

<td align="Justify" bgcolor="#FFFF99"><Font
class=content4><%=ars.Fields("line_item_nm")%></font></td>
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #3
"eddie wang" <ew***@kmg.com> wrote in message
news:up**************@tk2msftngp13.phx.gbl...
My field result is " Total Operating Revenue", which has spaces
before the words.

But, when I use the following html to display, I don't see the spaces.
Why? Thanks.

<td align="Justify" bgcolor="#FFFF99"><Font
class=content4><%=ars.Fields("line_item_nm")%></font></td>


Whitespace is collapsed in HTML. What are you trying to accomplish? Note,
your code is using several depreciated items that you should consider
removing (the align attribute, the bgcolor attribute, and the font tag).

If the whitespace is actually part of the content, then you could replace
the spaces with &nbsp;.

Regards,
Peter Foti
Jul 19 '05 #4
May I know how to use replace(str, " ", " ") or <pre></pre>?

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

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

Similar topics

4
by: Shashi | last post by:
Can somebody explain how the byte alignment for structures work, taking the following example and considering: byte of 1 Byte word of 2 Bytes dword of 4 Bytes typedef struct { byte a; word...
67
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...
22
by: David Rasmussen | last post by:
If I have struct foo { char bar; long baz; }; on many platforms, padding and alignment is taking place to get baz to start at an even address or an address that 4 divides. So baz is not
3
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...
12
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);
11
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...
55
by: fishpond | last post by:
How to declare a variable guaranteed to have the strictest possible alignment? -- The defense attorney was hammering away at the plaintiff: "You claim," he jeered, "that my client came at you...
2
by: somenath | last post by:
Hi All, I have one question regarding the alignment of pointer returned by malloc. In K&R2 page number 186 one union is used to enforce the alignment as mentioned bellow. typedef long...
6
by: Francois Grieu | last post by:
Hello, I'm asking myself all kind of questions on allocating an array of struct with proper alignment. Is the following code oorrect ? I'm most interested by the statement t =...
2
by: uamusa | last post by:
I am Dynamically generating a proposal(report) in MS Word. By default the Paragraph Alignment is "Left". For the First 6 Paragraphs I set the Alignment to "Center", and then when attempting to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.