Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Direction and floats etc. (English to Arabic)

Question posted by: RufusA@gmail.com (Guest) on June 27th, 2008 07:19 PM
Is there any way of getting float statements, padding etc. to take
account of the directionality of a page (i.e. the direction:rtl )

For example I have an old simple web page that uses *shudder* tables
to lay out the images and text. If I wanted to create an Arabic
version of this page, I could simply add a rtl direction to the body,
translate the text, and hey-presto the images would automatically leap
to the opposite side to match the direction of the page.

In a standards based page, layed out using divs, and css based floats,
padding etc. whilst the text sticks itself to correct edge of the
object, the floats themselves don't change directionality.

So I then have to painstakingly revisit the css changing every
float:left for a float:right, every padding and margin needs also to
be flipped etc.

Acceptable when you have one or two pages, but a logistical nightmare
where there is a whole site to translate.

Is there a neat way of changing the directionality of floated objects
to match the text? Surely it can't be that uncommon for international
companies to translate their sites to languages with rtl text
direction!

Rufus.
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Andreas Prilop's Avatar
Andreas Prilop
Guest
n/a Posts
June 27th, 2008
07:19 PM
#2

Re: Direction and floats etc. (English to Arabic)
On Wed, 11 Jun 2008, Join Bytes! wrote:
Quote:
Originally Posted by
Is there any way of getting float statements, padding etc. to take
account of the directionality of a page (i.e. the direction:rtl )


I have a small test at
http://www.unics.uni-hannover.de/nh...vocabulary.html
Make your window smaller to see how the text wraps.
Quote:
Originally Posted by
For example I have an old simple web page that uses *shudder* tables


There is nothing wrong with tables.
Quote:
Originally Posted by
So I then have to painstakingly revisit the css changing every
float:left for a float:right, every padding and margin needs also to
be flipped etc.


Or keep the tables.

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sea...:Alan.J.Flavell

Ben C's Avatar
Ben C
Guest
n/a Posts
June 27th, 2008
07:19 PM
#3

Re: Direction and floats etc. (English to Arabic)
On 2008-06-11, Join Bytes! <RufusA@gmail.comwrote:
Quote:
Originally Posted by
Is there any way of getting float statements, padding etc. to take
account of the directionality of a page (i.e. the direction:rtl )


No.
Quote:
Originally Posted by
For example I have an old simple web page that uses *shudder* tables
to lay out the images and text. If I wanted to create an Arabic
version of this page, I could simply add a rtl direction to the body,
translate the text, and hey-presto the images would automatically leap
to the opposite side to match the direction of the page.
>
In a standards based page, layed out using divs, and css based floats,
padding etc. whilst the text sticks itself to correct edge of the
object, the floats themselves don't change directionality.
>
So I then have to painstakingly revisit the css changing every
float:left for a float:right, every padding and margin needs also to
be flipped etc.
>
Acceptable when you have one or two pages, but a logistical nightmare
where there is a whole site to translate.


Indeed. There are certain things that will flip automatically
(text-indent, list item bullet positioning, list item indentation, which
margin gets overridden in overconstrained width calculations) with
direction, but also many things that don't.
Quote:
Originally Posted by
Is there a neat way of changing the directionality of floated objects
to match the text?


Your best bet is probably to use classes, and then a different
stylesheet for rtl, which sets float to the other direction (among other
things).

 
Not the answer you were looking for? Post your question . . .
182,318 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors