HTML CSS examples for CSS Widget:Nav bar image
Center Logo in the navbar
<html lang="en"> <head> <style> .parent-element {<!--from w w w .j a v a2s . c o m--> position:relative; width:201px; height:51px; outline:2px solid Chartreuse; } .child { position:absolute; outline:2px solid yellow; left:51%; top:51%; transform:translate(-51%, -51%); } </style> </head> <body translate="no"> <div class="parent-element"> <div class="child"> Lorem ipsum d </div> </div> </body> </html>