Complex sentence: Despite Emperor Frederick II's cordial visit in Venice in 1232, the relations between the emperor and the Republic deteriorated and, in 1239, Venice joined the Lombard League and fought against Ezzelino III da Romano, a powerful ally of Frederick.
Split into simpler sentences: Despite Emperor Frederick II's cordial visit to Venice in 1232, relations between the Empire and the Republic deteriorated. Consequently, in 1239, Venice joined the Lombard League and fought against Ezzelino III da Romano, a powerful ally of Frederick.