count for IntroText wrong if contains utf-8 characters
3 posts
• Page 1 of 1
count for IntroText wrong if contains utf-8 characters
Look at the screen capture of this module on my website:
I show only one Leading Article with image and IntroText, and several Linked Articles with only title links.
You can see that there is a problem:
The title link of the first Linked Article is NOT aligned left, but drifted a little right.
Why did this happen? I figured out: Because this module mod_featcats can NOT count the IntroText length correct if there are UTF-8 characters (like Chinese language) in it. And, if the IntroText was not cut off at the right point, then the first Linked Article will drift away.
You know that, it is very difficult to set the correct length limit for IntrText if this module can NOT count that length correctly.
So, I have two suggetstions:
1. Force the first Linked Articles (and all its siblings) align left, no matter where the IntroText of Leading Article was cut off.
2. Force the IntroText of Leading Article shown inside the space where the height equals the height of the thumbnail image, and the width equals the module width minus the thumbnail image width. And, also force the IntroText to fully fill that space, no matter what the length limit is. Maybe you need to use individual DIV element for each Leading Article and use CSS like overflow=hidden to do this.
Why this is important? Because this will ensure that when you publish several instances of this same module in a same line, they will show up in EQUAL HEIGHT, otherwise, if not equal height, they look very ugly.
Thanks.
I show only one Leading Article with image and IntroText, and several Linked Articles with only title links.
You can see that there is a problem:
The title link of the first Linked Article is NOT aligned left, but drifted a little right.
Why did this happen? I figured out: Because this module mod_featcats can NOT count the IntroText length correct if there are UTF-8 characters (like Chinese language) in it. And, if the IntroText was not cut off at the right point, then the first Linked Article will drift away.
You know that, it is very difficult to set the correct length limit for IntrText if this module can NOT count that length correctly.
So, I have two suggetstions:
1. Force the first Linked Articles (and all its siblings) align left, no matter where the IntroText of Leading Article was cut off.
2. Force the IntroText of Leading Article shown inside the space where the height equals the height of the thumbnail image, and the width equals the module width minus the thumbnail image width. And, also force the IntroText to fully fill that space, no matter what the length limit is. Maybe you need to use individual DIV element for each Leading Article and use CSS like overflow=hidden to do this.
Why this is important? Because this will ensure that when you publish several instances of this same module in a same line, they will show up in EQUAL HEIGHT, otherwise, if not equal height, they look very ugly.
Thanks.
-

baijianpeng - Junior Boarder

- Posts: 27
- Joined: Thu Nov 08, 2007 2:24 pm
Re: count for IntroText wrong if contains utf-8 characters
Hi,
I think the reason it's looking like that is that the image is floating left and there is no clearing after.
So, I have updated the current version with a little css fix for that problem.
Thank you!
I think the reason it's looking like that is that the image is floating left and there is no clearing after.
So, I have updated the current version with a little css fix for that problem.
Thank you!
-

chus - Administrator

- Posts: 455
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: count for IntroText wrong if contains utf-8 characters
I installed the latest version, it seems that you use separate UL element for Leading Articles and Linked Articles, but, the first line of Linked Article still drifted a little right.
I checked the source code of that page, there is no extra Tab or WhiteSpace characters before the first Linked Article link, this seems a weird problem.
Could you please try to wrap Leading Article block with a pair of DIV elements, and wrap the Linked Article block with another DIV pairs ? I think this may prevent the Linked Article links drifting.
Thanks.
I checked the source code of that page, there is no extra Tab or WhiteSpace characters before the first Linked Article link, this seems a weird problem.
Could you please try to wrap Leading Article block with a pair of DIV elements, and wrap the Linked Article block with another DIV pairs ? I think this may prevent the Linked Article links drifting.
Thanks.
-

baijianpeng - Junior Boarder

- Posts: 27
- Joined: Thu Nov 08, 2007 2:24 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest