How to create an adjustable set of lines?

Hi! I want to create a set of lines that can be adjusted as desired. I want to be able to create lines like below:



I tried something but the line will touch the edge.

You can use a clamp instead of subtract with .1 to .2 and get a bar on the left and 8. to .9 for the right.

Something like this?


Sorry I meant the if node. Layering a few if nodes with black and white and a few adds and multiples should work.

I don t know how I should arrange these