In my home country, you don't really offer to pay for petrol when someone is giving you a lift. You'd definitely return the favour in another way - buy them a drink, give them some fruit from your garden, look over their child's CV, that type of thing - but offering money could be seen as anything from slightly weird to downright offensive.
However, I have a German friend who will always tell me exactly how much I owe her in petrol when she gives me a lift. I've never actually asked her to give me a lift, it's more a scenario where she'll say, "I'm going to X shopping mall this afternoon, fancy joining?" and then she'll tell me how much I need to chip in for petrol and parking (although she would've made the exact same trip without me). It's always felt a bit mean to me but I suppose there are good sides to being pragmatic about money rather than getting wrapped up in endless favours.
What's the form in the UK? We recently moved somewhere rural and I have yet to pass my driving test. I would never ask for a lift unless it was a really good friend (or an absolute emergency and I couldn't get a taxi), but I've had two or three situations where someone has said, "I'm going to X town tomorrow, fancy joining?" and I'm honestly not sure what to do about the petrol question. I don't want to offend them but I also don't want to be a freeloader!
I was going to get them a Christmas present to say thank you anyway, as I appreciate the lift in and of itself, but then it dawned on me today that they're also paying for petrol (as a non-driver, it simply hadn't occurred to me before).