0

This image explains what I want:

screenshot

Of course I could achieve this in photoshop, but I want it to work for infinite width, so that's why I'd like to be able to achieve this via css or javascript.

How can this be done?

Evert
  • 2,022
  • 1
  • 20
  • 29
  • 1
    It is expected that you at least attempt to code this for yourself. Stack Overflow is not a code writing service. I would suggest that you do some additional research, either via Google or by searching SO, make an attempt and. if you still have trouble, come back with **your code** and explain what you have tried and why it did not work. – Paulie_D Feb 12 '16 at 10:52

1 Answers1

1

Open your image editor.

Crop the image to the 1px you want.

Insert as background-image and style with repeat-X.

http://www.w3schools.com/cssref/tryit.asp?filename=trycss_background-repeaty

EDIT 1

Based on the following answer:

put background image in center and repeat last pixel to left and right

You could try the border-image-source style.

Community
  • 1
  • 1
Emil S. Jørgensen
  • 6,216
  • 1
  • 15
  • 28