WebSite X5Help Center

 
Adrian B.
Adrian B.
User

Button in header banner not acting as expected  en

Autore: Adrian B.
Visite 50, Followers 1, Condiviso 0  

I am using buttons in the header banner - and they work fine - until I started using an auto translater that replaces the text of the button.

The X5 button object has no control of the text placement - it is centered - and that's it. There is no setting to make the text left or right for example.

This makes buttons hard to use as there isnt an easy way to line up the text horizontally when using multiple vertically spaced buttons.

So I tried instead using text object - the alignment works well, but there isn't a way to remove the underline link when using the text as a hyperlink. Also for some reason, some texts I can change the color of but others not - for example the "Cart Login" link stays blue no matter what I try.

So instead of X5's button and text object, I wrote my own button html - but it too only centers the text even though I'm using the "text-align: left;" parameter. In case the class was conflicting i renamed button to buttonabc, but still the text doesn't left align.

Any ideas appreciated. My custom button code is below

<!DOCTYPE html>
<html>
<head>
<style>
.buttonabc {
background-color: #000000;
border: none;
color: yellow;
padding: 1px 1px;
text-align: left;
text-decoration: none;
display: inline-block;
font-size: 14px;
cursor: pointer;
margin-top: 0px;
margin-bottom: 0px;
margin-right: 0px;
margin-left: 0px;
}
</style>
</head>
<body>


<a href="https://www.abthermal.com/thermal-abrasion-electrical-protection-product-selector-menu.html" class="buttonabc">Products</a>


</body>
</html>

Postato il
1 RISPOSTE
Adrian B.
Adrian B.
User
Autore

Followup:

The buttons with yellow text at the bottom of the header are X5 Text objects - they work but really hard to control the color and the hyperlink stays visible (the thin red line below the text).

The Bold white buttons to the right - Materials, Services, Company Info, How to Order - those are X5 button objects.

The custom white buttons use the custom code and the X5 HTML object: - Applications, Products, Specifications 

At the bottom right of the page you can see the language selector. If you change languages you can see the yellow text "buttons keep their left alignment nicely, but the X5 button objects and the custom X5 HTML buttons the translated text fills the button with centered text - even the custom buttons where the text is set to left.

Is something in X5 over-riding the text-align parameter??

Leggi di più
Postato il da Adrian B.