Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - CSS width property problem with western european characters

 
Thread Tools Search this Thread
Old 06-14-2006, 05:33 PM   #1
Default CSS width property problem with western european characters


When specifying a width property within a CSS style, data that contains
special characters (ex. umlauts) causes the data to be separated by
spaces . When I remove the width property, the data is presented
correctly.

Interestingly, I cut and pasted the following word (which was one
continous word - Tunnbröd ) into this message and the problem arose:
Tunnbr ö d

How do I remove the white-space?

TIA,
Ron in SF



ron.tornambe@bunkerhill.com
  Reply With Quote
Old 06-14-2006, 05:52 PM   #2
Els
 
Posts: n/a
Default Re: CSS width property problem with western european characters

wrote:

> When specifying a width property within a CSS style, data that contains
> special characters (ex. umlauts) causes the data to be separated by
> spaces . When I remove the width property, the data is presented
> correctly.
>
> Interestingly, I cut and pasted the following word (which was one
> continous word - Tunnbröd ) into this message and the problem arose:
> Tunnbr ö d


Can you show the problem page? Might help with detecting the problem


--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
  Reply With Quote
Old 06-14-2006, 08:18 PM   #3
Philip
 
Posts: n/a
Default Re: CSS width property problem with western european characters

In article < .com>,
"" <> wrote:

> When specifying a width property within a CSS style, data that contains
> special characters (ex. umlauts) causes the data to be separated by
> spaces . When I remove the width property, the data is presented
> correctly.
>
> Interestingly, I cut and pasted the following word (which was one
> continous word - Tunnbröd ) into this message and the problem arose:
> Tunnbr ö d
>
> How do I remove the white-space?


Ron,
Without a real example, I can only guess, but this smells like an
encoding problem. Wild guess -- are you using Windows notepad and saving
as "Unicode"?

Do post an example as Els recommended.

--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more
  Reply With Quote
Old 06-14-2006, 10:32 PM   #4
ron.tornambe@bunkerhill.com
 
Posts: n/a
Default Re: CSS width property problem with western european characters

Thanks for the reply Philip.

The data is coming from a MS-SQL database with mixed English/Western
Euorpean character data in some fields. The html is generated by
Crystal Reports that references CSS styles and an html wrapper I have
supplied. The reason for including the width property in the CSS style
is to work-around a quirk that prevents text-alignment from working
unless the width pproperty is supplied. Crystal is breaking the field
(ProductName, ex. Tunnbröd) into multiple <td>...<td> (one for each
special character) resulting in the erroneous spacing.

Here's a link to the html file:
http://www.bunkerhill.com/dev/ViewReport_Invoice.html

If you look under the Product Name: column, you'll see the problem. The
CSS style is cssStlye0036. You can search for ProductName or ö to see
the code.

I really appreciate your help. Thanks!
Ron

Philip wrote:
> In article < .com>,
> "" <> wrote:
>
> > When specifying a width property within a CSS style, data that contains
> > special characters (ex. umlauts) causes the data to be separated by
> > spaces . When I remove the width property, the data is presented
> > correctly.
> >
> > Interestingly, I cut and pasted the following word (which was one
> > continous word - Tunnbröd ) into this message and the problem arose:
> > Tunnbr ö d
> >
> > How do I remove the white-space?

>
> Ron,
> Without a real example, I can only guess, but this smells like an
> encoding problem. Wild guess -- are you using Windows notepad and saving
> as "Unicode"?
>
> Do post an example as Els recommended.
>
> --
> Philip
> http://NikitaTheSpider.com/
> Bulk HTML validation, link checking and more


  Reply With Quote
Old 06-15-2006, 12:05 AM   #5
NikitaTheSpider@gmail.com
 
Posts: n/a
Default Re: CSS width property problem with western european characters

wrote:
> Thanks for the reply Philip.
>
> The data is coming from a MS-SQL database with mixed English/Western
> Euorpean character data in some fields. The html is generated by
> Crystal Reports that references CSS styles and an html wrapper I have
> supplied. The reason for including the width property in the CSS style
> is to work-around a quirk that prevents text-alignment from working
> unless the width pproperty is supplied. Crystal is breaking the field
> (ProductName, ex. Tunnbröd) into multiple <td>...<td> (one for each
> special character) resulting in the erroneous spacing.
>
> Here's a link to the html file:
> http://www.bunkerhill.com/dev/ViewReport_Invoice.html
>
> If you look under the Product Name: column, you'll see the problem. The
> CSS style is cssStlye0036. You can search for ProductName or ö to see
> the code.


Ron,
There's two immediate problems here. The first is that you're
delivering UTF-8 data but labeling it as ISO-8859-1 in a META tag. The
characters don't display correctly at all for me (using Firefox) unless
I force the encoding to UTF-8.

The second problem is that cssStyle0036 specifies "WIDTH: 2.0521in" and
that style is applied to the o-with-umlaut that's in tunbrod. That
forces that single character to be 2 inches wide, although who knows
what an "inch" means on a computer screen. &diety; knows what Crystal
Reports thinks it is doing here. Good luck hammering it into behaving
nicely.

Bye

--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more


> Philip wrote:
> > In article < .com>,
> > "" <> wrote:
> >
> > > When specifying a width property within a CSS style, data that contains
> > > special characters (ex. umlauts) causes the data to be separated by
> > > spaces . When I remove the width property, the data is presented
> > > correctly.
> > >
> > > Interestingly, I cut and pasted the following word (which was one
> > > continous word - Tunnbröd ) into this message and the problem arose:
> > > Tunnbr ö d
> > >
> > > How do I remove the white-space?

> >
> > Ron,
> > Without a real example, I can only guess, but this smells like an
> > encoding problem. Wild guess -- are you using Windows notepad and saving
> > as "Unicode"?
> >
> > Do post an example as Els recommended.
> >
> > --
> > Philip
> > http://NikitaTheSpider.com/
> > Bulk HTML validation, link checking and more


  Reply With Quote
Old 06-15-2006, 04:11 AM   #6
ron.tornambe@bunkerhill.com
 
Posts: n/a
Default Re: CSS width property problem with western european characters

The meta tag was a left-over from various stabs at resolving the
problem that sired the inclusion of the width property. The orignal
problem was that the text-align attribute is not applied. The Crystal
html does specify the style in the <td>..</td> and all other style
attributes are applied, but the text-align has no effect. Any ideas
about this is appreciated.

tks

wrote:
> wrote:
> > Thanks for the reply Philip.
> >
> > The data is coming from a MS-SQL database with mixed English/Western
> > Euorpean character data in some fields. The html is generated by
> > Crystal Reports that references CSS styles and an html wrapper I have
> > supplied. The reason for including the width property in the CSS style
> > is to work-around a quirk that prevents text-alignment from working
> > unless the width pproperty is supplied. Crystal is breaking the field
> > (ProductName, ex. Tunnbröd) into multiple <td>...<td> (one for each
> > special character) resulting in the erroneous spacing.
> >
> > Here's a link to the html file:
> > http://www.bunkerhill.com/dev/ViewReport_Invoice.html
> >
> > If you look under the Product Name: column, you'll see the problem. The
> > CSS style is cssStlye0036. You can search for ProductName or ö to see
> > the code.

>
> Ron,
> There's two immediate problems here. The first is that you're
> delivering UTF-8 data but labeling it as ISO-8859-1 in a META tag. The
> characters don't display correctly at all for me (using Firefox) unless
> I force the encoding to UTF-8.
>
> The second problem is that cssStyle0036 specifies "WIDTH: 2.0521in" and
> that style is applied to the o-with-umlaut that's in tunbrod. That
> forces that single character to be 2 inches wide, although who knows
> what an "inch" means on a computer screen. &diety; knows what Crystal
> Reports thinks it is doing here. Good luck hammering it into behaving
> nicely.
>
> Bye
>
> --
> Philip
> http://NikitaTheSpider.com/
> Bulk HTML validation, link checking and more
>
>
> > Philip wrote:
> > > In article < .com>,
> > > "" <> wrote:
> > >
> > > > When specifying a width property within a CSS style, data that contains
> > > > special characters (ex. umlauts) causes the data to be separated by
> > > > spaces . When I remove the width property, the data is presented
> > > > correctly.
> > > >
> > > > Interestingly, I cut and pasted the following word (which was one
> > > > continous word - Tunnbröd ) into this message and the problem arose:
> > > > Tunnbr ö d
> > > >
> > > > How do I remove the white-space?
> > >
> > > Ron,
> > > Without a real example, I can only guess, but this smells like an
> > > encoding problem. Wild guess -- are you using Windows notepad and saving
> > > as "Unicode"?
> > >
> > > Do post an example as Els recommended.
> > >
> > > --
> > > Philip
> > > http://NikitaTheSpider.com/
> > > Bulk HTML validation, link checking and more


  Reply With Quote
Old 06-15-2006, 05:07 AM   #7
Philip
 
Posts: n/a
Default Re: CSS width property problem with western european characters

> > wrote:
> > > Thanks for the reply Philip.
> > >
> > > The data is coming from a MS-SQL database with mixed English/Western
> > > Euorpean character data in some fields. The html is generated by
> > > Crystal Reports that references CSS styles and an html wrapper I have
> > > supplied. The reason for including the width property in the CSS style
> > > is to work-around a quirk that prevents text-alignment from working
> > > unless the width pproperty is supplied. Crystal is breaking the field
> > > (ProductName, ex. Tunnbröd) into multiple <td>...<td> (one for each
> > > special character) resulting in the erroneous spacing.
> > >
> > > Here's a link to the html file:
> > > http://www.bunkerhill.com/dev/ViewReport_Invoice.html
> > >
> > > If you look under the Product Name: column, you'll see the problem. The
> > > CSS style is cssStlye0036. You can search for ProductName or ö to see
> > > the code.

> >
> > Ron,
> > There's two immediate problems here. The first is that you're
> > delivering UTF-8 data but labeling it as ISO-8859-1 in a META tag. The
> > characters don't display correctly at all for me (using Firefox) unless
> > I force the encoding to UTF-8.
> >
> > The second problem is that cssStyle0036 specifies "WIDTH: 2.0521in" and
> > that style is applied to the o-with-umlaut that's in tunnbrod. That
> > forces that single character to be 2 inches wide, although who knows
> > what an "inch" means on a computer screen. &diety; knows what Crystal
> > Reports thinks it is doing here. Good luck hammering it into behaving
> > nicely.


In article < .com>,
"" <> wrote:
> The meta tag was a left-over from various stabs at resolving the
> problem that sired the inclusion of the width property. The orignal
> problem was that the text-align attribute is not applied. The Crystal
> html does specify the style in the <td>..</td> and all other style
> attributes are applied, but the text-align has no effect. Any ideas
> about this is appreciated.


Ron,
First things first: PLEASE do not top-post. Here's a quick primer in
case you're not familiar with the term:
http://en.wikipedia.org/wiki/Top_posting

As to your most recent comments, I am confused as to why you have
mentioned text-align. Your original question was about odd spacing
around non-English characters. Did my suggestions solve that problem for
you?

In any case, I don't see a problem with the text alignment in my browser
(Firefox 1.5). The "Product Name" column is centered, as the CSS
suggests. If there's some other text-alignment problem you see, you'll
have to be more specific.

--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more
  Reply With Quote
Old 06-15-2006, 08:05 AM   #8
Jukka K. Korpela
 
Posts: n/a
Default Re: CSS width property problem with western european characters

<> scripsit:

> The reason for including the width property in the CSS style
> is to work-around a quirk that prevents text-alignment from working
> unless the width pproperty is supplied.


Which quirk? And which text-alignment? A data cell in a table is
left-aligned by default, and this is surely suitable for normal textual
content like product name. I haven't heard of any quirks in this issue. The
CSS code on the page is a horrendous mess, comparable to the products of
Office software before any cleanup, so it could cause problems, but then
_that_ should be fixed.

> Crystal is breaking the field
> (ProductName, ex. Tunnbröd) into multiple <td>...<td> (one for each
> special character) resulting in the erroneous spacing.


Well, then fix _that_. It is surely a problem, no matter what the spacing
might be.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump