WordPress.org

Ready to get started?Download WordPress

Forums

Word-Space for "subnav" class with Wp-Multilanguage (2 posts)

  1. sergiselvas
    Member
    Posted 5 years ago #

    Hi
    I've installed WP_Multilangues and now active languages are showing properly except for one point: there is now space between words.

    This is the multilanguage code:

    <?php
    echo "<div id='subnav'>";
    foreach($GLOBALS['AviableLanguages'] as $_K=>$_I){
    if ($_I['lang_shortcode'] != $language){
    $link = WP_Multilingual::LanguageLink($_SERVER['REQUEST_URI'], $_I['lang_shortcode']);
    echo "<span>".$_I['name']."</span>";
    }} echo "</div>";?>

    And this is the CSS:

    #subnav {
    float: right;
    color: #666666;
    font-size: 10px;
    width: 675px;
    padding-top: 10px;
    padding-bottom: 10px;
    text-transform: uppercase;
    text-align: right;
    padding-right: 10px;}
    #subnav a:link {
    color: #666666;
    font-size: 10px;
    text-transform: uppercase;}
    #subnav a:hover {
    color: #990000;
    font-size: 10px;
    text-transform: uppercase;}

    Web Site is: http://www.cinemanresa.com/fecinema/

    I've tried using "word-spacing" tag and it didn't work out. Could anyone help me with this? Thanks

  2. drewactual
    Member
    Posted 5 years ago #

    define the span class...in the php first change:
    `echo "<span class="span-1">".$_I['name']."</span>";

    then define the span attribute in your css...example:
    span-1 {word-spacing: 10px}

    maybe even this will work in your php file:
    echo "<span style="word-spacing:10px;">".$_I['name']."</span>";

Topic Closed

This topic has been closed to new replies.

About this Topic