asasass
February 1, 2017, 10:43am
1
I want to turn this into a link.
Maybe if you can do the first 2 colors I can maybe figure out the rest.
53.2% per color
<a href="" target="_blank" style="display:block; width: 266px; height: 50px;background-image: linear-gradient( to right, #ff0092 100px, #ffca1b 100px,#ffca1b 200px, #b6ff00 200px, #b6ff00 300px, #228dff 300px, #228dff 400px, #ba01ff 300px, #ba01ff 300px );"></a>
Hello,
I don’t understand, you will 53% for each color ?
asasass
February 1, 2017, 10:46am
3
I don’t speak french, sorry.
That is a link. The <a>
tag with an “href” value is the way to create a link.
If you’re asking about styling, then please explain more clearly what you are trying to achieve.
1 Like
asasass
February 1, 2017, 10:52am
9
Should I be separating the colors into percentages, and not px for this?
Gandalf
February 1, 2017, 10:52am
10
asasass:
What I want to do.
<a href=""...
IS a link as @TechnoBear has already said. All you need to do is put the URL between the two quote marks…
asasass
February 1, 2017, 10:53am
11
asasass:
53.2% per color
I’m trying to divide the colors up. 53.2% per color.
asasass
February 1, 2017, 10:55am
13
Each color will fill up that space. of 266 is the width.
5 colors
SamA74
February 1, 2017, 10:56am
14
In a linear gradient, you can use either unit, whichever best suits your needs.
You may find px works with a fixed size element and % is better for responsive elements which change size.
asasass
February 1, 2017, 10:58am
15
But, if I’m doing 53.2% of each color, wouldn’t I have to use percent?
ronpat
February 1, 2017, 11:01am
16
Not really. If the width of each color is 53.2% of the total width of the page, then you only have room for one color anyway.
ronpat
February 1, 2017, 11:03am
18
266px is not 100% (or maybe it is?)
100% / 5 = 20%
266px / 5 = 53.2px
2 Likes
asasass
February 1, 2017, 11:31am
19
I’m still confused on how I would set this up.
<a href="" target="_blank" style="display:block; width: 266px; height: 50px;background-image: linear-gradient( to right, #ff0092 100px, #ffca1b 100px,#ffca1b 20px, #b6ff00 20px, #b6ff00 30px, #228dff 30px, #228dff 40px, #ba01ff 30px, #ba01ff 30px );"></a>
“Set it up” in what way? As ever, if you explained your intentions - what you want/expect this to do, it would be easier to provide meaningful assistance.
2 Likes