I have two divs
<html> <head> <title></title> <style type="text/css"> #div1 { width: 45%; height: 500px; margin-right:2.5%; margin-top: 30px; background-color: red; display: inline-block; } #div2 { width: 45%; height: 300px; margin-right:2.5%; margin-top: 30px; background-color: blue; display: inline-block; } </style> </head> <body> <div id="div1"></div> <div id="div2"></div> </body> Gives me this
https://i.sstatic.net/n9EGy.png
As you can see my second(small) div is at the buttom of the other, how can I center it verticaly.
I tried to put them in another div and use vertical-align:minddle
middle. Is that in your actual code? Also if you usespanrather thandivyou get an inline element so that vertical aligning works.