Just so a ball doesn't fall through a line?
I have no idea of to what extent the advancedness of what you want is... But whatever.
If assuming that's what you want, but I might be wrong
Just do something like
If y-sprite height<25
Y++
End
If the line is at 25 y axis.
For collision in general to check if 2 things are touching I usually do
X is x of first object
Y is y of first object
A Is x of second
B is y of second
If abs(X-A)<6
If abs(Y-B)<6
Stuff
End
End
That'll check if if the 2 objects are less than six pixels apart.