WordPress.org

Ready to get started?Download WordPress

Forums

Move gtrans to the header or the top side of browser. (8 posts)

  1. fawkesblog2
    Member
    Posted 2 years ago #

    I have just installed the gtrans plugin. If you see my site http://www.chrisfawkes.net and scroll to the bottom you will see the option to select a language.

    What i would like to do is have that show in the top left corner of the browser. Would i need to create a new widgitized area for that? and if so i'm not too good with code so would there be somewhere with instructions that a novice like myself could follow.

    Or could anyone here explain it in simple terms.

    Or is there an easier option.

    Failing that my second choice would be to put it just under the header image.

    Thanks in advance.

  2. Alain Lankers
    Member
    Posted 2 years ago #

    Your site goes directly to: http://www.chrisfawkes.net/blog
    But I don't see any option to select a language on your site.

  3. fawkesblog2
    Member
    Posted 2 years ago #

    I apologize. It's down the bottom on the blog http://chrisfawkes.net/blog/the-blog/

  4. fawkesblog2
    Member
    Posted 2 years ago #

    Thank you for looking Alain.

  5. Alain Lankers
    Member
    Posted 2 years ago #

    The documentation says:
    Add a widget to your website or use [gtranslate] shortcode inside pages where you want the language selector to appear. You can use also the php code to add the language selector to your template: <?php echo do_shortcode('[gtranslate]'); ?>

    I've never used this plugin but you might try to remove the widget and put the php code somewhere in your header.php.

  6. fawkesblog2
    Member
    Posted 2 years ago #

    Cheers Alain.

    I took the shortcode and shortened gtranslate to gtrans which made the call.

    I then wrapped it in <div class="gtrans"><?php echo do_shortcode('[gtrans]'); ?></div>

    Then added .gtrans {
    bottom:0;
    position:fixed;
    z-index:160;
    _position:absolute;
    _top:expression(eval(document.documentElement.scrollTop+
    (document.documentElement.clientHeight-this.offsetHeight)));
    height:20px;
    }

    to the style css.

    Works perfect. Thank you for getting me on track.

  7. Alain Lankers
    Member
    Posted 2 years ago #

    In IE there's some code showing up near grtans.

    Check your code: <div style="padding:15px 0 15px 0; background-color:transparent; color:#666; font-size:10px; text-transform:uppercase; font-family:tahoma, Helvetica, sans-serif; text-align:right; margin:auto; clear:both; border-top:0px solid #000000;>

    It should be

    <div style="padding:15px 0 15px 0; background-color:transparent; color:#666; font-size:10px; text-transform:uppercase; font-family:tahoma, Helvetica, sans-serif; text-align:right; margin:auto; clear:both; border-top:0px solid #000000;">

  8. fawkesblog2
    Member
    Posted 2 years ago #

    Thank you for picking that up Alain.

Topic Closed

This topic has been closed to new replies.

About this Topic