vertical-align
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> .div1{ width:300px; height: 300px; background-color: red; text-align: center; } .con { height: 300px; display: inline-block; vertical-align: middle; } span{ vertical-align: middle; height: 300px; } .div2{ width:30px; height: 30px; display: inline-block; vertical-align: middle; background-color: green; text-align: center; } </style> </head> <body> <div class="div1"> <div class="con"></div> <span></span> <div class="div2"></div> </div> </body> </html>