How do I lane against ranged champions with melee champions

I'm trying to get back into this game after a break, so I'm trying to relearn fundamentals and the lot. Mainly go mage mid, or bot AD roles for this sort of thing. So I'd genuinely never get into these sort of matchups. Sadly, despite calling my role, I didn't have the balls to speak up and keep it and was forced top lane with a {{champion:240}} vs {{champion:17}} matchup with pretty much no experience. I tried to remember as much general knowledge as I could; bought Shield as start, built mr item Merc Treads asap. But Teemo still did so much burn dmg, leading my experience up on top lane lead to one of my worst feelings since getting back into the game. It got worse, Teemo swapped lanes with {{champion:45}} and he just farmed free stacks. So what can I do to improve and how do you guys put up with ranged champions as a melee one? I'd really appreciate the help and advice to get better. I'd like to be at least decent in all roles so I can at least not get 1v9 flamed and reported again. Thank you for the read.
Report as:
Offensive Spam Harassment Incorrect Board