A
A
Alexander2015-10-05 08:45:06
css
Alexander, 2015-10-05 08:45:06

How to make such a frame?

It is necessary to lay out the following link/button:
11f84ca47bab4228834e8a22ec9d8bce.png
Code: It is
<a href="#">Link text</a>
interesting to learn from the community how it would be most correct to implement this border.
So far I see 2 solutions:
1. border-image, I don't like the fact that the button will turn out to be of fixed size.
2. Create inside the container 2 50% width divs with absolute positioning and for each set a frame of its own color. The left, of course, without border-right, and the right without border-left. This solution is not liked because it looks overloaded.
What is the most concise way to solve this problem you could share?
UPD Thanks to everyone who answered the question. All options are working, but I liked the trick with the use of peudo-classes the most, and marked it with a solution.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Zuev, 2015-10-05
@Nordborn

For example, through one pseudo -element
jsfiddle.net/8qfs2vnk

D
Dima, 2015-10-05
@CrazyFail

Linear-gradient

K
Kirill Turovnikov, 2015-10-05
@turovnikoff

It is possible through pseudo -classes jsfiddle.net/straj/oh9a1kaq

3
3luyka, 2015-10-05
@3luyka

1.linear-gradient.
2. Can be implemented through pseudo-classes.

V
Vitaly Inchin ☢, 2015-10-05
@In4in

Two elements: ± here ±

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question