ThemeShaper Forums » Thematic

[closed]

.sf-menu {float: right} and page order

(5 posts)
  • Started 9 years ago by Mishkan
  • Latest reply from Mishkan
  • This topic is resolved
  1. Mishkan
    Member

    I use the WPML plugin for a multilingual site which has 2 left to right languages and 2 right to left ones.

    Because of that I use conditional css to load different alignments and styles for each language.

    I have

    .sf-menu {
    float: right;
    }

    in my rtl.css, which does its job, but I want the page order to be logical for right to left languages (i.e. I want to conditionally order my pages too based on whether I'm RTL or LTR). I assume I need some code in functions.php, but I'm a bit iffy on whether I need to do some removing before I do my adding. Can someone point me in the right direction?

    Thanks.

    Posted 9 years ago #
  2. do you have a link? how does the plugin determine whether you are LTR or RTL? does the plugin output any special body classes? do you already have a way to serve up a rtl.css and a ltr.css conditionally?

    Posted 9 years ago #
  3. Mishkan
    Member

    Languages can be changed via the top right dropdown, anything besides Turkish is RTL and will load rtl.css. I also can't figure out why the two RTL languages display differently even though they are using the same css file. (You'll see the sidebar not position properly)

    WPML provides a php variable ICL_LANGUAGE_CODE that one can use that contains the language of the current page, so I already serve up rtl and ltr conditionally depending on which language I'm in.

    The problem is just that the pages are in the wrong logical order on RTL pages so I assume I need a function to conditionally take care of that too.

    Thanks!

    Posted 9 years ago #
  4. So you want the Home Link to appear on the right for the RTL pages?

    try this:

    .sf-menu li {
    float:right;
    }

    Posted 9 years ago #
  5. Mishkan
    Member

    Yup, that did it. Needed to have both .sf-menu and .sf-menu li floated right, then. Thanks a lot!

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.