In your first expression, try replacing || with &&. You need an “and” operation there instead of an “or”.
In general, if you’re only worried about overlap in the x direction, you could do it like this:
x = thisComp.layer(“Null 5”).transform.position[0];
if (x > toWorld([0,0])[0] && x < toWorld([width,0])[0]) 0 else 100
Dan