Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to make zig-zag borders?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #201848
    Darijus
    Participant

    I am trying to make navigation buttons which would have zig-zag borders on hover.
    What I am trying to make: http://s27.postimg.org/xhzfmq4b3/zigzag.png

    I was looking for some tutorials and I could only find how to make these borders on top and bottom of the element. However, nobody done left and right ones.

    How do I make the borders exactly like in my picture?

    Thanks!

    #201883
    timbarden
    Participant

    You could use :before and :after pseudo elements for the left- and right-hand side respectively, with repeat-y background images of the triangle.

    #201884
    Paulie_D
    Member

    Sometimes the best options is a background image.

    Or a border-image…simpler all round than messing around with pseudo-elements (or actual elements) just to make something with pure CS.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.