Vorbly <Code>

CODING MADE EASY WITH VORBLY

WIX CODE CUSTOMIZE BUTTON STYLE

Need to customize your button style? This tutorial will show you how to customize your button style using Wix Code. You will be able to change background color, border color, text color, border radius and border width for your website buttons. We will provide you with the webpage elements and sample codes required to implement this feature.

THE DEMO

1/4

THE ELEMENTS

The Page

Button Element: #button1

THE CODE

Page Code

$w.onReady(function () {

    $w("#button1").style.backgroundColor = "#000000"; // or "black" or "rgb(255,255,255)"

    $w("#button1").style.borderColor = "#FFFFFF"; // or "white" or "rgb(0,0,0)"

    $w("#button1").style.color = "#FFFFFF"; // or "white" or "rgb(0,0,0)"

    $w("#button1").style.borderRadius = "10px";

    $w("#button1").style.borderWidth = "3px";

});

Reference:

1. HEX Color: HEX Colors

2. Color Code: HTML Color Codes

3. RGB Code: RGB Colors

4. HEX RGB Converter

COMMENTS

I'm a paragraph. Click here to add your own text and edit me. It's easy.

No comments. Be the first to leave a comment.

a button has icon for favorite on click how to change its heart icon color to red... after that on page load how to set icon color red of saved favorite

a href="https://youtube.com/smarthelp92">I know Programming</a>

wajid irshad

Jan 08, 2021

2

WEB DESIGN & DEVELOPMENT SOLUTIONS

GET PROFESSIONAL HELP