How can I increase my texts font-size over hovering without interacting with other contents?
So,I was testing to give my nav bar links a hover effect of font-sizing.But everytime I hover over an link,other contents(including other links) also interacts and moves from their own places,which is not what I was aiming for. __________________________________________________________________ HTML code - <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="iframe.css" type="text/css"> </head> <body> <nav> <a href="#">Home</a> <a href="#">Menu</a> <a href="#">Options</a> </nav> </body> </html> _________________________________________________________________ CSS code - nav { text-align: center; background-color: rgba(32,32,32,0.2); padding: 5px; padding-top: 80px; width: 100%; height:200px; } a { text-decoration: none; color: darkslateblue; font-weight: bold; padding: 30px; font-size: 16px; } a:hover { font-size: 20px; } ___________________________________________________________ I have tried google,but none of the solutions seem to work for me.Like using line-height,using transform scale,even tried measuring the padding and margin to keep the box area constant so it doesn't move the other contents,etc etc Would be nice if I can get some answers here. TIA ^_^