https://www.mobileread.com/forums/sho...&postcount=307
Take a look here for a general idea, the small margin on top and the sides in can be removed aswell, but I find it more comfortable this way.
This is for sideloaded epubs, I don't work with kepubs so no idea if it works aswell.