[Pro] Centre Google Translate Logo

On my splash page in the example - how do I centre the logo? I have this bit of extra code - but nothing seems to work.

Thanks Trevor

#translate-this { text-align: center; } #translate-this .translate-this-button { float: none !important; margin: 0 auto; }

http://www.metbergenviro.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

giving the #item9 (items have the damn right to carry a more semantic name, btw) a width of 171px is one possibility.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Thanks Thomas

171 px will do for the default one but the element width changes with each language - a minor thing I know - but is there a more generic method to centre the markup item?

Trevor


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Yep, understood, that’s indeed a lil cheesy and I have currently no solution for.

The widget expands to the left so I think you’ll always have the same problem as for now no matter what you’re doing. But this might be my personal opinion on this.

Cheers

Thomas

The german translation by the way is adventurous :slight_smile: and am not sure if I’d really prefer the original one.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Thanks Thomas

Yes - I understand the translation to various languages with Google is a bit “hit and miss” BUT it gives a general view of things - not ideal I understand.

There must be a way to centralise this element - anyone . . . ?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Hi Trev,
Remove the width from the element “Item9” and set the contents of the item “header1” to text align center. This will centre the translation widget in the header regardless of the chosen text width.
Regards,
Tim.

On 11 Nov 2015, at 12:55, t50ufo email@hidden wrote:

171 px will do for the default one but the element width changes with each language - a minor thing I know - but is there a more generic method to centre the markup item?


Experienced Freeway designer for hire - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Hi Tim

Good to hear from you.

Remove item width - do you mean disable it by grey out
header 1 to text align ctr - where please.

Item showing to extreme left just now.

T


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Hi Trev,
It looks like you’ve removed the width from “item9” already. You can do this by selecting the item and setting the width to “available” in the inspector.

Select the item “header1” and double-click inside this HTML item. If I’m correct in my assumption the Google Translate item has been added in here as an inflow markup item. Command-a will select everything in the HTML item and set the text alignment to center (again using the inspector). This should align the Google Translate item in the centre of the available column width.
Regards,
Tim.

On 11 Nov 2015, at 15:34, t50ufo email@hidden wrote:

Remove item width - do you mean disable it by grey out
header 1 to text align ctr - where please.

Item showing to extreme left just now.


Experienced Freeway designer for hire - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Sorry Tim - No Joy

Item 9 - have clicked on Dimensions - size - width - to grey out

Header 1 selected - double click and text align centre

No change
updated page still here

http://www.metbergenviro.co.uk

T


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

I also used Google Translate on a site, http://www.theberrypatch.com.au

It was a while ago now, long after my short term memory expiration date, but I seem to recall some positioning problems. The Google code produces an iframe so I’m not sure that the content is positionable, but I think that I used absolute positioning to hang it off the right. Here is what I quickly put together for your example…

div#:0.targetLanguage.goog-te-gadget-simple { 
    position: absolute; 
    right: 5%;
}

Margin auto and some other forms of centering can break down for items that are not actually in the document flow (floats and scripted elements). I don’t know what the hey is with the code that makes it so, but centering it is just not a practical solution for this, so I opted for a right alignment. Maybe you will too.

Best,


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Thanks for that :slight_smile:

Where am I placing this code please.

T


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Try the following procedure:

####Creating a Tag style

Go into the styles dialogue and click + for new. Click into the tag field and paste the following line (prefix included):

#google_translate_element

Delete whatever is in the name-field and click back into the Tag field.

####Adding style to this Tag style

Then choose paragraph → align → center(-icon)

Preferably force to publish (CTR-key, file->publish everything).

I tried it in the browser and It should be enough for to work.

If not (or for your own WYSIWYG convenience:

####Centering the MarkUp item

Select the #item9 and apply the CenterAlign class (which should be permanent) there (Inspector T-tab). This should center the MarkUp. Publish again.

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Thanks Thomas

I will give that a go and let you know

Really appreciate you taking time on this.

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Works!

Simply selected item 9 and applied ctr align from Styles

Google Translate is in the correct place!

In the net it really was that simple!

Thanks Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options