How do I get my hitbox to align properly?

No matter what I do, only one side of the box moves. Is there a better way to line up a hitbox to my png?
        visible_width = 35  
        hitbox_height = self.rect.height - 25 
        self.hitbox = pygame.Rect(0, 0, visible_width, hitbox_height)
        self.hitbox.right = self.rect.right - 18  
        self.hitbox.y = self.rect.y + (self.rect.height - hitbox_height) // 2