I think you might benefit from learning the basics of HTML & CSS because, from what I have seen so far, you don’t have a firm grasp of the code you’re using.
Perhaps I am mistaken, in which case I apologise, but your problems seem to stem from copying other’s code and not being able to adapt it.